R. David Murray added the comment:
Because there's a different issue for making strftime system independent, issue
3173.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20281
___
dendory added the comment:
Why is the focus on documentation entries when the real work should be on
trying to make this function to work on all platforms?
I understand that Windows's implementation of strftime() defines %z and %Z to
return the same thing, but timezone information is still
New submission from Mike Owens:
When using strftime from the time module on 64bit Python for Windows the format
specifier %z gives the time zone name instead of the time zone offset as stated
in the documentation.
eg
strftime(%z)
'US Mountain Standard Time'
strftime(%Z)
'US Mountain
Mike Owens added the comment:
Expected output should be -0700.
I checked Python 3.3.1 and 2.7.4 on Linux and the output is as expected.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20281
R. David Murray added the comment:
Please see the footnote on the 'time' documentation page. It sounds like
Windows is treating %z as if was %Z.
There should be a reference to that footnote from the %z table entry, so that's
a doc bug. Might also be worth explicitly mentioning this weird
Mike Owens added the comment:
Documentation doesn't have a foot note for either %z or %Z but there is generic
footnote talking about C lib behavior and that %z is deprecated. I guess if
there were a foot note in the table for %z that would save some time for
everyone.
--
Mike Owens added the comment:
The datetime.strftime function produces no output for %z or %Z. Very irritating.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20281
___
SilentGhost added the comment:
Mike, the note is at the very bottom of the page.
datetime.strftime produces empty strings with this specifiers for naïve
objects, are the object you're testing timezone-aware?
--
nosy: +SilentGhost
___
Python tracker
R. David Murray added the comment:
The %z table entry exists only in the 3.4 (dev) docs, not the 3.3 docs. There
is no doc change needed for 3.3, since it doesn't mention %z except in the
footnote.
And yes, I should have mentioned that the datetime versions only work with
aware timezones.
Mike Owens added the comment:
I'm looking right at the 3.3 docs right now. %z is in the table.
8.1.8. strftime() and strptime() Behavior
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20281
R. David Murray added the comment:
Ah, you are correct. I'm not sure what page I was looking at before. Maybe I
hadn't switched away from the python2 page.
--
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
11 matches
Mail list logo