Re: [Datetime-SIG] A local timezone class
On Fri, Aug 28, 2015 at 4:37 PM, Alexander Belopolsky < alexander.belopolsky@gmail.com> wrote:
On Fri, Aug 28, 2015 at 6:53 PM, Guido van Rossum <guido@python.org> wrote:
I'm not entirely sure why we didn't add this to the stdlib ages ago.
Maybe because tm_gmtoff was not added to time.struct_time until Python 3.3 [1] and was not available from the most of the C libraries at the time?
[1]: https://docs.python.org/3/library/time.html#time.struct_time
But (as my base class shows) implementing the required API using only the tm_isdst flag and the timezone-related attributes of the time module (tzname, timezone, altzone) a satisfactory implementation can be obtained, and that API has been stable since the beginning of time. (Well, at least since 1993: https://hg.python.org/cpython-fullhistory/rev/6ee380349c84 .) -- --Guido van Rossum (python.org/~guido)
participants (1)
-
Guido van Rossum