2 ms·
The 2038 problem is someone else's fault, and I mostly use 64bit systems. Every time I implement something that assumes the year will take four digits I have a
by notaddicted 14y ago
The 2038 problem is someone else's fault, and I mostly use 64bit systems. Every time I implement something that assumes the year will take four digits I have a little moment of 'ugh'. The context for me was using python list slice operations to take apart a timestamp, but I now use datetime.datetime.strptime.
EDIT: I just looked up the source for python 2.7.3 and even in strptime the %Y format specifier assumes that the year has four digits (see line 204-206 http://hg.python.org/cpython/file/70274d53c1dd/Lib/_strptime.py http://hg.python.org/cpython/file/70274d53c1dd/Lib/_strptime... ) so I'm not out of the woods yet.