On 09/03/2015 09:02 AM, Alexander Belopolsky wrote: > On Thu, Sep 3, 2015 at 10:52 AM, Carl Meyer <[email protected] > <mailto:[email protected]>> wrote: > > It is no longer true that "arithmetic within a timezone is always > naive." > > If you like this rule, you can keep it. :-) Just note that fold=1 > instances are in a different timezone.
Ok, so for most of the year when I do utctime.astimezone(Eastern), I get a result in Eastern, but during one hour of the year I get a result in "some other timezone that isn't quite Eastern" (but its tzinfo is still the same object as all the others). That's your proposal for a _less_ surprising interpretation? ;-) > This is unavoidable because > within the same timezone fold=1 instances don't exist: 01:59 is followed > by 02:00 with no room for "second 01:30" in between. Right. That's an excellent statement of why respecting `fold` at all is inconsistent with how tz-annotated datetimes are designed to behave in Python (they operate internally in naive time, in which the "fold" time does not even exist). Carl
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Datetime-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/datetime-sig The PSF Code of Conduct applies to this mailing list: https://www.python.org/psf/codeofconduct/
