[Python-Dev] PEP 495 accepted (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Thu Sep 24 04:47:11 CEST 2015
- Previous message (by thread): [Python-Dev] PEP 495 accepted
- Next message (by thread): [Python-Dev] PEP 495 accepted
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 24 Sep 2015 01:21, "Tim Peters" <tim.peters at gmail.com> wrote:
Guido's reply gave a clearer invariant: dt.timestamp() == dt.astimezone(utc).timestamp() == dt.astimezone().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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20150924/77f592db/attachment.html>
- Previous message (by thread): [Python-Dev] PEP 495 accepted
- Next message (by thread): [Python-Dev] PEP 495 accepted
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]