mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
Fix crash in module_utils.datetime.fromtimestamp() (#11206)
Fix crash in module_utils.datetime.fromtimestamp().
This commit is contained in:
3
changelogs/fragments/11206-datetime.yml
Normal file
3
changelogs/fragments/11206-datetime.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
bugfixes:
|
||||
- "datetime module utils - fix bug in ``fromtimestamp()`` that caused the function to crash.
|
||||
This function is not used in community.general (https://github.com/ansible-collections/community.general/pull/11206)."
|
||||
@@ -15,7 +15,7 @@ def ensure_timezone_info(value):
|
||||
|
||||
|
||||
def fromtimestamp(value):
|
||||
return _datetime.fromtimestamp(value, tz=_datetime.timezone.utc)
|
||||
return _datetime.datetime.fromtimestamp(value, tz=_datetime.timezone.utc)
|
||||
|
||||
|
||||
def now():
|
||||
|
||||
Reference in New Issue
Block a user