mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-25 06:37:24 +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:
parent
1e9217197f
commit
e741e22ec4
2 changed files with 4 additions and 1 deletions
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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue