How to detect dst problem.
Hi, My program does not give correct time reading because of day light time saving happened over last weekend. I have to mannually add/subtract a -1 constant everytime this happens. Is there a way that i can detect dst change so this add/subtract can happen automatically? For instance, i can do an if statement to determine what constant should be added when computing a time value. Thanks a lot. Regards Kim Titu __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com
On Mon, 29 Oct 2001, Titu Kim wrote:
My program does not give correct time reading because of day light time saving happened over last weekend. I have to mannually add/subtract a -1 constant everytime this happens. Is there a way that i can detect dst change so this add/subtract can happen automatically? For instance, i can do an if statement to determine what constant should be added when computing a time value. Thanks a lot.
Ordinarily, your operating system should detect this and adjust accordingly. I would suggest checking & fixing your operating system's configuration first, then using Python's 'time.localtime()' function, which incorporates your operating system's knowledge of the time zone, etc. Dustin -- Dustin Mitchell dustin@cs.uchicago.edu dustin@ywlcs.org
participants (2)
-
Dustin Mitchell -
Titu Kim