]]>https://bbs.archlinux.org/profile.php?id=138392012-11-30T23:43:35Zhttps://bbs.archlinux.org/viewtopic.php?pid=1200537#p1200537Thanks for the feedback. After experimenting I've concluded that the CST bit is unknown to srptime as I change it to say PST all is well(Other than the wrong time zone). I'll look at using dateutil. I don't need the timezone data, I just wanted a more standard look for the dates.

As far as using the time module I believe it suffers the same problem as I believe they share a codebase

]]>https://bbs.archlinux.org/profile.php?id=104462012-11-29T22:16:12Zhttps://bbs.archlinux.org/viewtopic.php?pid=1200101#p1200101Why not use the standard python 'time' module?]]>https://bbs.archlinux.org/profile.php?id=623502012-11-29T21:41:30Zhttps://bbs.archlinux.org/viewtopic.php?pid=1200089#p1200089AFAIK the standard python library is a bit lacking on timezone handling; if I recall correctly the strptime does not even support %Z or %z. strftime will return '' for %z if timezone information is missing from the original object. You will probably need to use an external module such as dateutil which can handle timezones properly. For example

Handling of timezone conversions is quite a daunting task. I think dateutil is the easier way to get going, no need to reinvent the wheel.

]]>https://bbs.archlinux.org/profile.php?id=357552012-11-29T21:37:16Zhttps://bbs.archlinux.org/viewtopic.php?pid=1200086#p1200086I wrote a python script to get my e-mails via IMAP, works great except, time data isn't consistently formatted. I have a little bit of code to iterate over a list of formats to try, but chokes on this string