[Datetime-SIG] What's are the issues?
Lennart Regebro
regebro at gmail.com
Wed Jul 29 19:05:41 CEST 2015
On Wed, Jul 29, 2015 at 7:00 PM, Tim Peters <tim.peters at gmail.com> wrote:
> is_dst remains necessary to distinguish between ambiguous local times,
> just as Chris states:
But with the current implementations, those do not exist. datetime
explicitly and intentionally assume that 1 day always is 24 hours.
Hence, in the datetime universe, local times can not be ambiguous,
> Not so. It can easily (albeit rarely) arise in cases of pure timezone
> conversions. Conversions have nothing to do with arithmetic. If I
> convert a time in zone X to a time in zone Y that lands in an
> ambiguous span in zone Y, without the conversion _also_ setting an
> is_dst flag in the destination, it's impossible to reliably convert
> the time in zone Y back to zone X again.
No, you just consistently pick one of the two times in both
conversions to and from and it will roundtrip just fine.
//Lennart
More information about the Datetime-SIG
mailing list