From: Adam T. W. <ad...@mo...> - 2007-10-24 15:05:52
|
In using Jython to process messages from an IMAP server I've discovered that it can't convert to the local timezone correctly while CPython does work correctly. Any work arounds for this? awilliam@WM_ADAM1:~> cat tztest.py=20 import time, os, email.Utils m =3D "Tue, 23 Oct 2007 15:07:18 GMT" d =3D email.Utils.parsedate_tz(m) d =3D time.localtime(email.Utils.mktime_tz(d)) print time.strftime('%Y-%m-%d %H:%M:%S', d) awilliam@WM_ADAM1:~> python tztest.py=20 2007-10-23 11:07:18 <--------- Correct awilliam@WM_ADAM1:~> jython tztest.py=20 2007-10-23 10:07:18 <---------- Wrong openSUSE 10.3 / python-2.5.1-39 / jython-2.2-155 |