mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-27 05:43:09 +00:00
[PR #11206/cbf13ab6 backport][stable-12] Fix crash in module_utils.datetime.fromtimestamp() (#11212)
Fix crash in module_utils.datetime.fromtimestamp() (#11206)
Fix crash in module_utils.datetime.fromtimestamp().
(cherry picked from commit cbf13ab6c9)
Co-authored-by: Felix Fontein <felix@fontein.de>
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