[issue6641] strptime doesn't support %z format ?

2010-06-11 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

On Fri, Jun 11, 2010 at 10:43 AM, Mark Dickinson  wrote:
..
> It's a little awkward to review this patch independently of the issue 5094 
> patch.
>  Can we work on issue 5094 first, and then come back to this one?

Sure.  Unfortunately, I think I fixed a few timezone doc warts here
and did not update 5094.  I will fix that.

--

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-06-11 Thread Mark Dickinson

Mark Dickinson  added the comment:

It's a little awkward to review this patch independently of the issue 5094 
patch.  Can we work on issue 5094 first, and then come back to this one?

--

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-06-08 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Attached patch includes issue 5094 patch.

--
keywords: +patch
nosy: +mark.dickinson
stage: unit test needed -> commit review
Added file: http://bugs.python.org/file17590/issue6641.diff

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-06-08 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
dependencies: +datetime lacks concrete tzinfo impl. for UTC
stage:  -> unit test needed
type: behavior -> feature request
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-06-01 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-05-25 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-05-25 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

If concrete tzinfo subclass is added to datetime module (see issue5094), it 
will become feasible to meaningfully parse timezone information.

--
assignee:  -> belopolsky

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-05-25 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +belopolsky

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2010-05-25 Thread dudologist

dudologist  added the comment:

If %z works only in certain circumstances that behaviour should be documented 
wherever %z is referred to.

--
nosy: +dudologist

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2009-08-20 Thread David House

David House  added the comment:

Yes and no.

Firstly, %z isn't listed as deprecated in the documentation of the time
module's strftime -- although %Z is (note differing case).

Secondly, I still think the bug is invalid, because the documentation of
datetime.datetime.strptime says it behaves like time.strptime, whose
documentation says "only the directives specified in the documentation
[of strftime()] are supported". Since we're in the time module, that
reference to strftime() means time.strftime(), which doesn't list %z as
a directive.

Finally, there *is* a confusing docs issue, however: the "strftime()
behaviour" section in the datetime module documentation lists %z as a
valid directive, whereas it's not listed in time.strftime. Although
these functions have in theory nothing to do with one another, you would
in practice expect them to support the same directives.

Since in fact the footnote in the documentation of time.strftime() says
%z isn't supported by all ANSI C platforms (despite apparently being
required by the standard), I suggest that %z be removed from the list of
allowed modifiers in the "strftime() behaviour" section in the datetime
module documentation.

--

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2009-08-20 Thread Andrew Brown

Andrew Brown  added the comment:

I think this bug is just a doc bug. If you check 

http://docs.python.org/library/datetime.html?highlight=strptime#strftime-behavior

and 

http://docs.python.org/library/time.html?highlight=strptime#time.strptime

You can see that the first link lists %z as a valid modifier, while in
the second link  (in footnote 1) it is mentioned as deprecated.

--
nosy: +abrown

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2009-08-04 Thread David House

David House  added the comment:

>From the documentation from time.strptime() (which acts the same as
datetime.strptime()):

"Only the directives specified in the documentation [of time.strftime()]
are supported. Because strftime() is implemented per platform it can
sometimes offer more directives than those listed. But strptime() is
independent of any platform and thus does not necessarily support all
directives available that are not documented as supported."

So I think invalid.

--
nosy: +dmhouse

___
Python tracker 

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



[issue6641] strptime doesn't support %z format ?

2009-08-04 Thread Esteban Feldman

New submission from Esteban Feldman :

When trying to use datetime.strptime %z directive got an unexpected error.

>>> from datetime import datetime
>>> 
>>> fecha = u'Sun Aug 02 19:01:25 + 2009'
>>> datetime.strptime(fecha, '%a %b %d %H:%M:%S %z %Y')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.6/_strptime.py", line 317, in _strptime
(bad_directive, format))
ValueError: 'z' is a bad directive in format '%a %b %d %H:%M:%S %z %Y'

--
components: None
messages: 91256
nosy: Eka
severity: normal
status: open
title: strptime doesn't support %z format ?
type: behavior
versions: Python 2.6

___
Python tracker 

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