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

Alexander Belopolsky alexander.belopolsky at gmail.com
Wed Aug 19 23:47:28 CEST 2015

On Wed, Aug 19, 2015 at 4:54 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> However, the Wikipedia page does say:
> "Time zones in ISO 8601 are represented as local time (with the location
unspecified), as UTC, or as an offset from UTC."
> but nothing about how one specifies the location -- I have no idea if
there is an ISO 8601 way to specify a location, but I've never seen it --
wikipedia may mean that it should be specified some other way than embedded
in the string.

Correct, but specifying the location has nothing to do with the computer
notion of a time zone.   The IETF experts working on the Time Zone Data
Distribution standard explain that right in the introduction:

   Note that the term "time zone" does not have the common meaning of a
   region of the world at a specific UTC offset, possibly modified by
   daylight saving time.

(I quoted this part already in the message that crossed with yours.)  See <
http://datatracker.ietf.org/doc/draft-ietf-tzdist-service> for details.

> though I don't think this really has anything to do with the topic at
ahnd -- is anyone proposing that parsing ISO strings _should_ assume a time

No, but only because this is already part of the standard library:

>>> from datetime import datetime
>>> datetime.strptime("2015-03-08 12:00:00-0500", "%Y-%m-%d %H:%M:%S%z")
datetime.datetime(2015, 3, 8, 12, 0,
tzinfo=datetime.timezone(datetime.timedelta(-1, 68400)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150819/7e93c7a8/attachment.html>

More information about the Datetime-SIG mailing list