jsaul at gmx.de
Mon Mar 10 10:28:38 CET 2003
I have a problem when using time.strftime() to compose a RFC822
date, namely the printed time zone is incorrect:
>>> time.strftime("%a, %d %b %Y %H:%M:%S %z", time.localtime())
'Mon, 10 Mar 2003 10:26:51 +0000'
It should be '+0100' because this is CET time zone:
>>> time.strftime("%a, %d %b %Y %H:%M:%S %z", time.gmtime())
'Mon, 10 Mar 2003 09:26:54 +0000'
This is all correct. But I don't want to go via 'time.timezone'
to get the proper offset into the date string. Unless the above
behaviour is a bug, I must have overlooked something, but what?
More information about the Python-list