[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2021-02-26 Thread Eryk Sun


Change by Eryk Sun :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2016-02-17 Thread Eryk Sun

Eryk Sun added the comment:

%z works correctly in the new CRT that's used by 3.5:

Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25)
[MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.strftime('%z', time.localtime(time.time()))
'-'
>>> time.strftime('%Z', time.localtime(time.time()))
'Coordinated Universal Time'

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 2.7

___
Python tracker 

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2016-02-17 Thread Václav Dvořák

Changes by Václav Dvořák :


--
nosy: +Václav Dvořák

___
Python tracker 

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2014-10-10 Thread Martin Taibr

Martin Taibr added the comment:

Same behavior on Windows 8.1. Possible workaround:

 from datetime import datetime
 from dateutil import tz
 datetime.now(tz.tzlocal()).strftime('%z')
'+0200'

--
nosy: +martin-t

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2014-07-14 Thread Alexandr Nevskiy

Alexandr Nevskiy added the comment:

The same odd behavior for Windows 7

C:\Python34\python.exe
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 bit 
(Intel)] on win32
Type help, copyright, credits or license for more information.
 import time
 time.strftime('%z', time.localtime(time.time()))
'Russian Standard Time'
 time.strftime('%Z', time.localtime(time.time()))
'Russian Standard Time'

--
nosy: +kepkin
versions: +Python 3.4

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2014-04-12 Thread R. David Murray

R. David Murray added the comment:

Can you suggest how to improve the docs?

--

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2014-04-12 Thread Aaron Meurer

Aaron Meurer added the comment:

Nowhere at https://docs.python.org/3.5/library/time.html#time.strftime is it 
indicated that %z behaves differently on different platforms. What it *does* 
say is

%z  Time zone offset indicating a positive or negative time difference from 
UTC/GMT of the form +HHMM or -HHMM, where H represents decimal hour digits and 
M represents decimal minute digits [-23:59, +23:59].

I see now that this is mentioned in the footnote at the bottom of the page.

I would split that footnote into two notes. It's really about two things, %Z/%z 
compatibility, and the RFC. The RFC note should stay as it is in the footnote, 
but I would move the bits about %Z/%z compatibility much close to their entries 
in the table, as that is where people are going to look (I personally wouldn't 
even hide the information in a footnote, but that can be debated).

--

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2014-04-12 Thread Aaron Meurer

Aaron Meurer added the comment:

I also just noticed that the %z entry in the table wasn't added until the 
Python 3.3 docs, although it apparently works at least in OS X in Python 2.7 (I 
can't test Windows right now).  Was it supposed to be one of the additional 
directives supported on certain platforms?

--

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2014-04-09 Thread Aaron Meurer

Aaron Meurer added the comment:

The docs could be much more clear about this in my opinion.

--
nosy: +Aaron.Meurer

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2013-12-17 Thread Civa Lin

New submission from Civa Lin:

On windows xp (Taiwanese) platform...

c:\ py -c import time; print(time.strftime('%z', time.localtime()))

It will raise a UnicodeEncodeError in my system.

I think it's not a +HHMM format and has different behavior with document:
http://docs.python.org/3/library/time.html#time.strftime

--
components: Library (Lib), Unicode, Windows
messages: 206484
nosy: civalin, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: time.strftime('%z') didn't make +HHMM return in windows xp
type: behavior
versions: Python 3.3

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2013-12-17 Thread R. David Murray

R. David Murray added the comment:

As the documentation of the module says, we pass this call through to the 
underlying c library.  What does the Windows documentation say about %z?

A quick google turns up this hit, which seems to indicate it is a platform 
problem:

http://connect.microsoft.com/VisualStudio/feedback/details/797109/strftime-incorrect-multibyte-encoding-of-timezone-z

--
nosy: +r.david.murray

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



[issue20010] time.strftime('%z') didn't make +HHMM return in windows xp

2013-12-17 Thread Civa Lin

Civa Lin added the comment:

Oh! Thanks your info!

--

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