DateTime.strftime bug
Bug #142784 reported by
Steve Alexander
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DateTime |
Incomplete
|
Medium
|
Lennart Regebro |
Bug Description
strftime doesn't seem to respect the timezone
>>> DateTime.
'2003-11-19 18:32 GMT'
There's regex code (that I wrote way back when...) that actually does this properly in the DateTime.strftime code. For some reason, it no longer works as it should do. Some other change must have broken it.
affects: | zope2 → datetime |
To post a comment you must log in.
The regexp '(^\|[^%])%z' makes no sense, and (^|[^%])%z' seems to work better.
I would be interested in knowing why the much simpler "format. replace( '%Z', '%0+05d' % (diff/36))" isn't used. That at least doesn't take 20 minutes to debug by carefully analyzing regexps and seems to do what is needed, which is to replace %Z with the timezone... ;)