[Datetime-SIG] PEP-0500 (Alternative datetime arithmetic) Was: PEP 495 ... is ready ...

Chris Barker chris.barker at noaa.gov
Wed Aug 19 19:27:34 CEST 2015


On Wed, Aug 19, 2015 at 10:22 AM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:

> Regardless of the software involved, if I give you an ISO 8601 string
> "2015-03-07 12:00:00-0500" and ask you: What time will be 24 hours after
> that?  I bet your answer will be "2015-03-08 12:00:00-0500."  And I don't
> think you will appreciate being ridiculed for not knowing that the
> "correct" answer is  "2015-03-08 13:00:00-0400."
>

But that isn't, and can't be the "correct" answer.  ISO 8601 does not have
a way to encode timezones. So that string can only mean a particular time
in UTC. Unless there is a specification of the timezone somewhere else.

But this is about how to interpret ISO 8601 strings, so really a different
question anyway.

-Chris

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150819/f39efae7/attachment-0001.html>


More information about the Datetime-SIG mailing list