freeipa/ipatests/test_ipapython
Alexander Bokovoy 1f6ca418ee handle Y2038 in timestamp to datetime conversions
According to datetime.utcfromtimestamp() method documentation[1],
this and similar methods fail for dates past 2038 and can be replaced by
the following expression on the POSIX compliant systems:

  datetime(1970, 1, 1, tzinfo=timezone.utc) + timedelta(seconds=timestamp)

Make sure to use a method that at least allows to import the timestamps
properly to datetime objects on 32-bit platforms.

[1] https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp

Fixes: https://pagure.io/freeipa/issue/8378

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
2020-06-25 09:18:02 +03:00
..
__init__.py Make an ipa-tests package 2013-06-17 19:22:50 +02:00
test_certdb.py Check valid before/after of external certs 2019-12-10 16:23:31 +01:00
test_cookie.py handle Y2038 in timestamp to datetime conversions 2020-06-25 09:18:02 +03:00
test_directivesetter.py Add option to remove lines from a file 2019-04-02 19:35:38 +02:00
test_dn.py pytest: Migrate unittest/nose to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_dnsutil.py Py3: Remove subclassing from object 2018-09-27 11:49:04 +02:00
test_ipautil.py Silence W601 .has_key() is deprecated 2020-05-05 10:42:46 +02:00
test_ipavalidate.py pytest: Migrate unittest/nose to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_kerberos.py Sprinkle raw strings across the code base 2018-09-27 10:23:03 +02:00
test_keyring.py Silence W601 .has_key() is deprecated 2020-05-05 10:42:46 +02:00
test_session_storage.py pytest: Migrate xunit-style setups to Pytest fixtures 2020-02-12 18:08:32 +02:00
test_ssh.py Add workaround for pytest 3.3.0 bug 2017-11-28 19:43:15 +01:00