>
> [Tim Peters]
>
> >
> > Guido's reply gave a clearer invariant:
> >
> > dt.timestamp() ==
> > dt.astimezone(utc).timestamp() ==
> > dt.astimezone().timestamp()
>
> [ Nick Coghlan]
> Might it be worth mentioning Guido's invariant in the section of the PEP
> about the timestamp method
On 24 Sep 2015 01:21, "Tim Peters" 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 equi
[Nick Coghlan ]
> ...
> Sorry, what I wrote in the code wasn't what I wrote in the text, but I
> didn't notice until Guido pointed out the discrepancy. To get the
> right universal invariant, I should have normalised the LHS, not the
> RHS:
>
> dt.astimezone(utc).astimezone(dt.tzinfo) ==
>