[issue22377] %Z in strptime doesn't match EST and others

2021-11-01 Thread Kevin
Kevin added the comment: With the introduction of PEP 0615 (https://www.python.org/dev/peps/pep-0615/) —  Support for the IANA Time Zone Database in the Standard Library — should this be revisited to now leverage ZoneInfo to fully parse these time zone values in Python 3.9+ (or 3.11 with intro

[issue22377] %Z in strptime doesn't match EST and others

2019-11-26 Thread miss-islington
miss-islington added the comment: New changeset bc441ed7c1449f06df37905ee6289aa93b85d4cb by Miss Islington (bot) (Karl Dubost) in branch 'master': bpo-22377: Fixes documentation for %Z in datetime (GH-16507) https://github.com/python/cpython/commit/bc441ed7c1449f06df37905ee6289aa93b85d4cb -

[issue22377] %Z in strptime doesn't match EST and others

2019-10-01 Thread karl
karl added the comment: I created a PR following the recommendations of p-ganssle https://github.com/python/cpython/pull/16507 -- nosy: +karlcow ___ Python tracker ___ ___

[issue22377] %Z in strptime doesn't match EST and others

2019-10-01 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +16096 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16507 ___ Python tracker ___

[issue22377] %Z in strptime doesn't match EST and others

2019-09-12 Thread Paul Ganssle
Change by Paul Ganssle : -- stage: -> needs patch versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5, Python 3.6 ___ Python tracker ___

[issue22377] %Z in strptime doesn't match EST and others

2019-04-11 Thread SilentGhost
SilentGhost added the comment: PR on github, Alex -- nosy: +SilentGhost ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue22377] %Z in strptime doesn't match EST and others

2019-04-10 Thread Ram Rachum
Change by Ram Rachum : -- nosy: -cool-RR ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue22377] %Z in strptime doesn't match EST and others

2019-04-10 Thread Alex LordThorsen
Alex LordThorsen added the comment: It's been a while since I've committed a patch. Do I still upload a diff file here or should I open a PR for the doc changes on github? -- ___ Python tracker

[issue22377] %Z in strptime doesn't match EST and others

2019-04-09 Thread Paul Ganssle
Paul Ganssle added the comment: @Alex LordThorsen: It will accept EST if EST is one of your "local" time zones, so whatever's in `time.tzname`. In the short term, I think the right thing to do would be to update the documentation to remove the reference to "EST", and add an explanatory note

[issue22377] %Z in strptime doesn't match EST and others

2019-04-08 Thread Alex LordThorsen
Alex LordThorsen added the comment: This behavior is currently unchanged and the docs still state that `EST` is an acceptable value. ``` >>> datetime.strptime("2019-01-28 18:54:45 EST", "%Y-%m-%d %H:%M:%S %Z") Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/py

[issue22377] %Z in strptime doesn't match EST and others

2018-10-29 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I think strptime should only accept %Z when it comes together with %z and not do any validation. This is close to the current behavior. %Z by itself is useless because even when it is accepted, the value is discarded: >>> print(datetime.strptime('UTC

[issue22377] %Z in strptime doesn't match EST and others

2018-07-05 Thread Paul Ganssle
Change by Paul Ganssle : -- nosy: +p-ganssle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue22377] %Z in strptime doesn't match EST and others

2016-05-17 Thread R. David Murray
Changes by R. David Murray : -- versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22377] %Z in strptime doesn't match EST and others

2016-05-17 Thread R. David Murray
R. David Murray added the comment: Peter: yes, that is what I've been saying this issue is for :) Anything else is a new issue. Note that it *does* also recognize the strings in time.tzname in addition to UTC and GMT. -- ___ Python tracker

[issue22377] %Z in strptime doesn't match EST and others

2016-05-16 Thread Peter Inglesby
Peter Inglesby added the comment: Given the difference between the documented and the actual behaviours, and given that it's apparently not obvious what the correct fix should be, would a patch that updates the docs (to say that %Z only matched GMT and UTC) be welcome? -- nosy: +ingle

[issue22377] %Z in strptime doesn't match EST and others

2014-09-19 Thread Akira Li
Akira Li added the comment: > I don't think we are going to support a timezone list like that without PEP > 431. PEP 431 won't fix this issue. See below. > You should attach your patch to a new issue. When I said this should > the doc issue, that is because only a doc fix is acceptable for 3.

[issue22377] %Z in strptime doesn't match EST and others

2014-09-17 Thread R. David Murray
R. David Murray added the comment: I don't think we are going to support a timezone list like that without PEP 431. You should attach your patch to a new issue. When I said this should the doc issue, that is because only a doc fix is acceptable for 3.4. Adding more timezones to recognize wou

[issue22377] %Z in strptime doesn't match EST and others

2014-09-16 Thread Akira Li
Akira Li added the comment: If the current implementation is considered correct (%Z not recognizing EST) then indeed extending the list of recognized timezones is another issue. And the docs should be changed to match the implementation. The current behavior is broken, see also issue22426 If we

[issue22377] %Z in strptime doesn't match EST and others

2014-09-16 Thread Berker Peksag
Berker Peksag added the comment: > if PEP 431 is implemented (or anything that gives access to zoneinfo) > then strptime could extend the list of timezones it accepts (utc + > local timezone names) to include names from the tz database: FTR, I have a WIP(and probably a bit outdated) branch to i

[issue22377] %Z in strptime doesn't match EST and others

2014-09-15 Thread R. David Murray
R. David Murray added the comment: I think its existing behavior is because it doesn't have access to a list of recognized timezones. As you say, this could be fixed by PEP 431. It could also be fixed by adopting the "email standard" timezones (see email/_parseaddr.py), which is a def-facto

[issue22377] %Z in strptime doesn't match EST and others

2014-09-13 Thread Akira Li
Akira Li added the comment: Without %z (utc offset) strptime returns a naive datetime object that is interpreted as utc or local time usually. It might explain why %Z tries to match only utc and the local timezone names. -- ___ Python tracker

[issue22377] %Z in strptime doesn't match EST and others

2014-09-13 Thread Akira Li
Akira Li added the comment: if PEP 431 is implemented (or anything that gives access to zoneinfo) then strptime could extend the list of timezones it accepts (utc + local timezone names) to include names from the tz database: import pytz # $ pip install pytz {tzname for tz in map(pytz.time

[issue22377] %Z in strptime doesn't match EST and others

2014-09-09 Thread R. David Murray
R. David Murray added the comment: Looking at the code, the only timezone strings it recognizes are utc, gmt, and whatever is in time.tzname (EST and EDT, in my case). This seems...barely useful, although clearly not useless :) And does not seem to be documented. -- nosy: +belopolsky,

[issue22377] %Z in strptime doesn't match EST and others

2014-09-09 Thread Ram Rachum
New submission from Ram Rachum: The documentation for %Z ( https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior ) says it matches `EST` among others, but in practice it doesn't: Python 3.4.0 (v3.4.0:04f714765c13, Mar 16 2014, 19:25:23) [MSC v.1600 64 bit (AMD64)] on