time/strptime/mktime/localtime

M.-A. Lemburg mal at lemburg.com
Fri Nov 12 04:57:33 EST 1999


Oleg Broytmann wrote:
> 
> Hello!
> 
>    The following program prints "1999-09-21 21:44:33" on Linux and
> "1999-09-21 22:44:33" on Solaris (1 hour offset).
> 
>    Is it a problem with my config? libs? python? Timezone is Europe/Moscow,
> set (I think) correctly on both systems.
> 
> #! /usr/local/bin/python -O
> 
> import time
> 
> t = time.strptime("1999-09-21 21:44:33", "%Y-%m-%d %T")
> m = time.mktime(t)
> print time.strftime("%Y-%m-%d %T", time.localtime(m))

Could be that one of those sets the DST flag to 0 while
the other sets it to 1... please provide the output of
time.strptime() for both machines.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                    49 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/





More information about the Python-list mailing list