[issue20281] time.strftime %z format specifier is the same as %Z

2015-06-26 Thread R. David Murray

R. David Murray added the comment:

Because there's a different issue for making strftime system independent, issue 
3173.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2015-06-26 Thread dendory

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 available in other 
ways. For example, _get_timezone() returns the offset in seconds between 
localtime and UTC. I don't have VC++ 2010 installed so I can't test it but this 
seems like a fairly simple thing to fix. Just take that result and multiply.

ref: https://msdn.microsoft.com/en-us/library/38wx0s70%28v=vs.100%29.aspx

--
nosy: +dendory

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread R. David Murray

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread Mike Owens

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread R. David Murray

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.  You can get an aware local time from email.utils.localtime(). 
 (This localtime function may eventually move to
the datetime module if it can be made more reliable, but it works fine for the 
use cases the email package needs.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread SilentGhost

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread Mike Owens

Mike Owens added the comment:

The datetime.strftime function produces no output for %z or %Z. Very irritating.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread Mike Owens

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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread R. David Murray

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 Windows 
behavior.

FYI, you can use the strftime functionality of the datetime module to get cross 
platform %z support.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, r.david.murray
stage:  -> needs patch
versions: +Python 3.4 -Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread Mike Owens

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20281] time.strftime %z format specifier is the same as %Z

2014-01-16 Thread Mike Owens

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 Standard Time'

The expected output for my time zone is -7:00.

--
components: Library (Lib)
messages: 208295
nosy: Mike.Owens
priority: normal
severity: normal
status: open
title: time.strftime %z format specifier is the same as %Z
type: behavior
versions: Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com