mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Fix crash in module_utils.datetime.fromtimestamp() (#11206)
Fix crash in module_utils.datetime.fromtimestamp().
(cherry picked from commit cbf13ab6c9)
This commit is contained in:
@@ -22,8 +22,8 @@ def ensure_timezone_info(value):
|
||||
|
||||
def fromtimestamp(value):
|
||||
if _USE_TIMEZONE:
|
||||
return _datetime.fromtimestamp(value, tz=_datetime.timezone.utc)
|
||||
return _datetime.utcfromtimestamp(value)
|
||||
return _datetime.datetime.fromtimestamp(value, tz=_datetime.timezone.utc)
|
||||
return _datetime.datetime.utcfromtimestamp(value)
|
||||
|
||||
|
||||
def now():
|
||||
|
||||
Reference in New Issue
Block a user