[Datetime-SIG] Are there any "correct" implementations of tzinfo?
Tim Peters
tim.peters at gmail.com
Mon Sep 14 23:48:11 CEST 2015
[Carl Meyer <carl at oddbird.net>,
on "aware" datetimes following the "naive time" model]
> ...
> You may want to rail against that model. I (and some others) already
> did. You can go back in the archives here and read our efforts. Perhaps
> you'll have better luck if you try; I doubt it.
There are two ways Random832 might have better luck:
1. Making Guido regret naive time.
2. Making datetime change what it's done for the last dozen years.
I'd say the chance of #1 is one in a billion. But that's a lot better
than the chance of #2 ;-)
> But given that model, this is the only approach that makes sense.
We should also note that we already _tried_ paying attention to fold
within a single zone. Besides being even more of a conceptual mess,
as you and I batted examples back & forth it became clear that it
broke various other kinds of backward compatibility.
> And you can get the same work done in that model. If you want to operate
> on the physical-time timeline, just always operate in UTC internally and
> only translate to "aware datetimes" at display time. That's what you
> probably should be doing anyway.
Alas, sanity is the last thing any good programmer will yield to ;-)
More information about the Datetime-SIG
mailing list