1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-25 14:47:26 +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:
patchback[bot] 2025-11-25 21:42:22 +01:00 committed by GitHub
parent 1e9217197f
commit e741e22ec4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View 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)."

View file

@ -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():