[Python-Dev] iso8601 parsing
barry at barrys-emacs.org
Wed Dec 6 14:54:34 EST 2017
> On 26 Oct 2017, at 17:45, Chris Barker <chris.barker at noaa.gov> wrote:
> This is a key point that I hope is obvious:
> If an ISO string has NO offset or timezone indicator, then a naive datetime should be created.
> (I say, I "hope" it's obvious, because the numpy datetime64 implementation initially (and for years) would apply the machine local timezone to a bare iso string -- which was a f-ing nightmare!)
I hope the other obvious thing is that if there is a offset then a datetime that is *not* naive can be created
as it describes an unambiguous point in time. We just cannot know what political timezone to choose.
I'd guess that it should use the UTC timezone in that case.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev