[Python-Dev] Status on PEP-431 Timezones (original) (raw)
Lennart Regebro regebro at gmail.com
Thu Apr 9 04:34:36 CEST 2015
- Previous message (by thread): [Python-Dev] Status on PEP-431 Timezones
- Next message (by thread): [Python-Dev] Status on PEP-431 Timezones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Apr 9, 2015 at 1:31 AM, Alexander Belopolsky <alexander.belopolsky at gmail.com> wrote:
Storing isdst in the datetime object would allow utcoffset(dt) to distinguish between 1:30AM before clock change and 1:30AM after. Where do you propose to store the offset? If you store it in dt, why would you need the tzinfo?
Because otherwise you don't know what tzinfo the datetime uses, and you need to know that if you add or subtract a timedelta, or compare with another datetime.
Regardless, whatever the proposal to add timezones to stdlib will end up being, it must include the ability to implement an equivalent of UNIX date command shown above.
That's a strftime() issue, I think that issue is already solved.
- Previous message (by thread): [Python-Dev] Status on PEP-431 Timezones
- Next message (by thread): [Python-Dev] Status on PEP-431 Timezones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]