It is probably the best to calculate back to UTC.

Assume "2005-06-07 15:07:12"  the local time, then convert it as
follows to UTC. Use the UTC time to store/manipulate/whatever you want
to do.

import time
t = time.mktime(time.strptime("2005-06-07 15:07:12", "%Y-%m-%d
%H:%M:%S"))

print time.ctime(t)

offset = time.timezone
if time.daylight:
    offset = time.altzone
t += offset
print time.ctime(t)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to