[Python-Dev] Status on PEP-431 Timezones
Ethan Furman
ethan at stoneleaf.us
Mon Jul 27 23:30:45 CEST 2015
To use Alexander's example:
>
> --> t = datetime(2015, 3, 7, 12, tzinfo=timezone('US/Eastern'))
> --> t.strftime('%D %T %z %Z')
> '03/07/15 12:00:00 -0500 EST'
>
> --> (t + timedelta(1)).strftime('%D %T %z %Z')
> '03/08/15 12:00:00 -0400 EDT'
The data (aka the time) should act naively, but the metadata (aka the timezone) is what should be changing [1].
--
~Ethan~
[1] Which is to say that naive datetime's should continue as-is, and aware datetimes should exhibit the above behavior.
More information about the Python-Dev
mailing list