On Wed, Aug 19, 2015 at 2:47 PM, Alexander Belopolsky <
[email protected]> wrote:
> 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.
>
sigh -- tangled up in semantics again. we really need a glossary!
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)))
>
semantics again -- this does indeed create an "aware" timezone, one with a
tzinfo object with a fixed offset -- which is what ISO 8601 says it means.
But anyway, I think we've only gotten tangled up in semantics here -- I
haven't seen anything proposed about this that I have a problem with.
-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
[email protected]
_______________________________________________
Datetime-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/datetime-sig
The PSF Code of Conduct applies to this mailing list:
https://www.python.org/psf/codeofconduct/