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

Carl Meyer carl at oddbird.net
Wed Aug 19 22:30:07 CEST 2015


On 08/19/2015 02:13 PM, Alexander Belopolsky wrote:
> 
> On Wed, Aug 19, 2015 at 1:27 PM, Chris Barker <chris.barker at noaa.gov
> <mailto:chris.barker at noaa.gov>> wrote:
> 
>     ISO 8601 does not have a way to encode timezones.
> 
> 
> I don't have the official $300+ PDF of the standard, but wikipedia
> disagrees with you:
> <https://en.wikipedia.org/wiki/ISO_8601#Time_zone_designators>.

I think Chris is distinguishing between "timezones" and "UTC offsets".
ISO 8601 can certainly encode a UTC offset, but it can't encode a
timezone in the sense of "America/New_York".

Which is why it's not incorrect at all to say that "2015-03-07
12:00:00-0500" plus 24 hours is "2015-03-08 12:00:00-0500." To claim it
should instead be "2015-03-08 13:00:00-0400" is making an unjustified
assumption that "UTC-0500" must only mean "America/New_York, not during
DST."

On the other hand, it's at least arguably incorrect to say that "12:00
March 7 2015 EST" plus 24 hours is "12:00 March 8 2015 EST" rather than
"13:00 March 8 2015 EDT". When you're working in terms of a timezone
rather than just a UTC offset, there's a reasonable expectation to
handle that timezone's DST transitions.

Carl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150819/19537598/attachment.sig>


More information about the Datetime-SIG mailing list