[Datetime-SIG] Another round on error-checking
tim.peters at gmail.com
Wed Sep 2 19:20:14 CEST 2015
>> Paying attention to fold=1 in naive time does muddy the naive-time
>> concept. A little. But it should hardly ever matter: even using a
>> 495 tzinfo, there is nothing a user working _in_ naive time can do to
>> see a fold=1 value. They have to force it by hand, or use an
>> operation _outside_ of naive time (like .astimezone()) to get one.
> There are two more cases:
> (1) datetime.now() will return fold=1 instances during one hour each year;
> (2) datetime.fromtimestamp(s) will return fold=1 instances for some values
> of s.
Sure - but anything reflecting how a local clock actually behaves is
outside of "naive time". Clocks in naive time never jump forward or
backward. Specifically, .now() and .fromtimestamp() are also
operations outside of naive time.
It might, of course, have helped had the docs said a word about any of this ;-)
More information about the Datetime-SIG