Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/11206-datetime.yml
Original file line number Diff line number Diff line change
@@ -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)."
2 changes: 1 addition & 1 deletion plugins/module_utils/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
Loading