[Guido] > ... > - In a reply to this thread, you wrote "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." Can you clarify this (I'm not sure how this works, though I > intuitively agree that the two rules should be each other's opposite) and > add it to the PEP?
If ts_true is the timestamp with first=True, and ts_false the timestamp with first=False, then: - The original time was ambiguous (fold) iff ts_true < ts_false. - The original time was invalid (in a gap) iff ts_true > ts.false. - The original time was neither ambiguous nor invalid iff ts_true == ts._false. At least that was my guess ;-) I agree the PEP should spell it out regardless. _______________________________________________ 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/
