problem with "time"

a_geek at web.de a_geek at web.de
Tue Mar 8 20:14:29 CET 2005


Hello,

I'm writing a small program that needs to check Unix timestamps for
falling into an interval (typical usage: ./program 2005-03, you get
the idea). Now, I create two time stamps from the user's input to
create the interval's borders using mktime(). Trying to check the sanity
of my program, I also converted the values back to tuples using
localtime(). Unfortunately, I get back one of them with the DST flag
set, and the other with the DST flag unset.

I have _no_ idea on how localtime() could reasonably synthesize
different values for that flag for _any_ time value converted in about
the same millisecond. What gives?

Thank you!



More information about the Python-list mailing list