[Python-ideas] Reduce platform dependence of date and time related functions

random832 at fastmail.us random832 at fastmail.us
Tue Sep 17 18:49:23 CEST 2013

On Tue, Sep 17, 2013, at 12:23, Alexander Belopolsky wrote:
> You should review what's new in 3.x documents.  Many of the features that
> you ask for have already been implemented.

To what are you referring? 3.4 what's new mentions no changes related to
the time module.  3.3 mentions only new functions unrelated to time
conversions. The change mentioned in 3.2 does not fix limitations caused
by the platform. 32-bit platforms are still limited by the range of
time_t for gmtime [and e.g. datetime.fromtimestamp], and MSVC, while
having a 64-bit time_t, is limited to positive values (and arbitrarily
imposes the same limitation on functions that accept a struct tm,
rejecting any time that would, interpreted as local time, result in a
value before 1970-01-01 00:00:00 GMT) 3.1 and 3.0 mention no changes to
the time module.

All of the issues I mentioned apply to 3.3 (You may not have noticed the
range issue as it may not apply to your platform, and by "should always
be provided" i meant _always_, even if the platform doesn't provide them
- they can be populated from timezone/altzone and tzname in that case),
and the epoch/leap second thing is still clearly present in the 3.4

I personally confirmed every single issue I mentioned except for the one
about a pure-python implementation of datetime (which was because I was
misled by the web hg browser), and except for the year 2038 limitation
that does not apply on this system, on this version: Python 3.3.2
(v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)]
on win32

More information about the Python-ideas mailing list