Author EGuesnet
Recipients EGuesnet, Michael.Felt, vstinner
Date 2020-01-30.14:52:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580395952.57.0.931992594087.issue39502@roundup.psfhosted.org>
In-reply-to
Content
> I'm not sure of the meaning of your patch. Are you saying that localtime() supports timestamp after the year 2038 on 64-bit AIX? Did you test that time.localtime(2**32) actually works as expected?

I think it worked as expected before 3.8 on 64 bit.

On AIX 64bit, with Python3.7.4,

$ python3_64
Python 3.7.4 (default, Jan 15 2020, 15:46:22)
[GCC 8.3.0] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import time; time.localtime(2**32)
time.struct_time(tm_year=2106, tm_mon=2, tm_mday=7, tm_hour=7, tm_min=28, tm_sec=16, tm_wday=6, tm_yday=38, tm_isdst=0)

and on 32bit

$ python3_32 
Python 3.7.4 (default, Jan 15 2020, 15:50:53) 
[GCC 8.3.0] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import time; time.localtime(2**32)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: timestamp out of range for platform time_t

With the new Python 3.8.1, on both 32 and 64bits,

Python 3.8.1 (default, Jan 30 2020, 11:23:14) 
[GCC 8.3.0] on aix
Type "help", "copyright", "credits" or "license" for more information.
>>> import time; time.localtime(2**32)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: localtime argument out of range
History
Date User Action Args
2020-01-30 14:52:32EGuesnetsetrecipients: + EGuesnet, vstinner, Michael.Felt
2020-01-30 14:52:32EGuesnetsetmessageid: <1580395952.57.0.931992594087.issue39502@roundup.psfhosted.org>
2020-01-30 14:52:32EGuesnetlinkissue39502 messages
2020-01-30 14:52:32EGuesnetcreate