[Datetime-SIG] A local timezone class

Guido van Rossum guido at python.org
Sat Aug 29 01:51:38 CEST 2015

On Fri, Aug 28, 2015 at 4:37 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

> On Fri, Aug 28, 2015 at 6:53 PM, Guido van Rossum <guido at 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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150828/49a88495/attachment.html>

More information about the Datetime-SIG mailing list