pep proposal : A date object for the standard library

Greg Ewing greg at cosc.canterbury.ac.nz
Sun Dec 9 23:55:06 EST 2001


Harald Hanche-Olsen wrote:
> 
> What should the module do if you ask it to do the conversion?
> It might silently assume today's rule will be in effect, it might
> print a warning, or it might raise an exception.

I think using the current rules is reasonable. Any sane
program is going to keep the time in some standard absolute
format internally, and use DST only for input & display
purposes. The user enters the time assuming the current
rules are in effect. If the rules change, the program
will start displaying it using the new rules.

DST does bother me for another reason, though: it makes
some date-times ambiguous. Suppose something is scheduled
to happen at 1:30am on the day DST ends. Okay... is that
when my clock reads 1:30am for the first or second time
that day? :-)

-- 
Greg Ewing, Computer Science Dept, University of Canterbury,	  
Christchurch, New Zealand
To get my email address, please visit my web page:	  
http://www.cosc.canterbury.ac.nz/~greg



More information about the Python-list mailing list