[issue13284] email.utils.formatdate function does not handle timezones correctly.

2011-10-28 Thread Burak Arslan
Burak Arslan added the comment: turns out timetuple was not passing timezone information. the correct way of converting a datetime.datetime object to a correct rfc-2822 compliant date string seems to be: email.utils.formatdate(time.mktime(a.utctimetuple()) + 1e-6 * a.microsecond

[issue13284] email.utils.formatdate function does not handle timezones correctly.

2011-10-28 Thread Burak Arslan
New submission from Burak Arslan : There's an issue with email.utils.formatdate function, illustrated here: https://gist.github.com/1321994 for reference i'm on Europe/Istanbul timezone, which is +03:00 because of DST at the time of this writing. I'm on stable Python 2.7.2