[Datetime-SIG] PEP 495 (Local Time Disambiguation) is ready for pronouncement
Tim Peters
tim.peters at gmail.com
Sun Aug 16 05:27:37 CEST 2015
[Ethan Furman]
>> Correction to PEP:
>>
>> ----------------------------------
>> [about halfway down]
>> The value returned by dt.timestamp() given a missing dt will be the larger
>> of the two "nice to know" values if dt.first == True and the larger
>> otherwise.
>>
>> Presumably the first "larger" should be "smaller".
[Alexander]
> No. The rule for the missing time is the opposite to that for the
> ambiguous time.
> This allows a program that probes the TZ database by calling timestamp with
> two different values of the "first" flag to avoid any additional calls
> to differentiate between the gap and the fold.
Did you note that the original quote uses "larger" twice?
will be the larger of the two if ... and the larger otherwise
^^^^^^ ^^^^^^
_One_ of them should surely say "smaller" instead ;-) Although I'd
use "earlier" and "later".
More information about the Datetime-SIG
mailing list