[Python-Dev] TZ-aware local time (original) (raw)

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Jun 5 20:29:59 CEST 2012


Changing subject to reflect a change of topic.

On Tue, Jun 5, 2012 at 2:19 PM, Guido van Rossum <guido at python.org> wrote:

.. Although if we ever get that "local time" tzinfo object, we may regret it. So I propose to launch without it and see if people object. There simply isn't a way to roundtrip for times that fall in the DST->std transition, and I doubt that many users will want to think about it (they'd have to store an extra bit with all their datetime objects -- it would be better to get them to use tzinfo objects instead...).

I've also been arguing against "local time" tzinfo and my proposal was to create a function that would produce TZ-aware local time with tzinfo bound to a fixed-offset timezone. In New York that would mean EDT in the summer and EST in the winter. This is what Unix date utility does.

See http://bugs.python.org/issue9527 .



More information about the Python-Dev mailing list