Re: [Python-Dev] PEP 495 accepted

2015年9月23日 19:49:06 -0700

On 24 Sep 2015 01:21, "Tim Peters" <[email protected]> wrote:
>
> Guido's reply gave a clearer invariant:
>
> dt.timestamp() ==
> dt.astimezone(utc).timestamp() ==
> dt.astimezone(<any other tz>).timestamp()
>
> That's the key point. If the timestamps are equivalent, then it
> follows that conversions to UTC are equivalent (UTC calendar notation
> is just another way to spell a POSIX timestamp), and so also that
> conversions back from UTC are equivalent.
Thanks for the additional clarifications all, I'm confident I understand
now :)
Might it be worth mentioning Guido's invariant in the section of the PEP
about the timestamp method?
Cheers,
Nick.
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to