Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:

Yes, thanks for doing the detailed analysis. I see that the original code was 
trying to adjust the timezone for a past time effectively using current 
timezone rules, which is why it doesn't work.

Your patch appears equivalent to the slightly simpler

dt = datetime.datetime(1993, 4, 21, 8, 3, 0, 0, utc)
r.created = time.mktime(dt.astimezone(None).timetuple())

which echoes the intent of the original code to adjust for the timezone. Can 
you see any reason why the above shouldn't work? On my test machine, it worked 
fine with the above code and locations of Moscow, London and Caracas (the 
original code failed with Caracas, though not with Moscow - but do I understand 
that the original is broken).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14902>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to