Skip to content

Commit cbf13ab

Browse files
authored
Fix crash in module_utils.datetime.fromtimestamp() (#11206)
Fix crash in module_utils.datetime.fromtimestamp().
1 parent ebb5341 commit cbf13ab

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bugfixes:
2+
- "datetime module utils - fix bug in ``fromtimestamp()`` that caused the function to crash.
3+
This function is not used in community.general (https://github.com/ansible-collections/community.general/pull/11206)."

plugins/module_utils/datetime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def ensure_timezone_info(value):
1515

1616

1717
def fromtimestamp(value):
18-
return _datetime.fromtimestamp(value, tz=_datetime.timezone.utc)
18+
return _datetime.datetime.fromtimestamp(value, tz=_datetime.timezone.utc)
1919

2020

2121
def now():

0 commit comments

Comments
 (0)