classification
Title: extend strftime/strptime format for RFC3339 and RFC2822
Type: enhancement Stage: test needed
Components: Library (Lib) Versions: Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: belopolsky Nosy List: belopolsky, cvrebert, davydov, eric.araujo, ezio.melotti, mihaic, mribecky, r.david.murray, tinchester
Priority: normal Keywords:

Created on 2009-02-10 17:06 by davydov, last changed 2014-03-13 17:43 by tinchester.

Messages (5)
msg81565 - (view) Author: Iakov Davydov (davydov) Date: 2009-02-10 17:06
Currently there is no obvious way to parse time from ISO
8601/W3C/RFC3339 date&time format (http://www.ietf.org/rfc/rfc3339.txt)
or RFC2822. (Actually RFC2822 could be parsed with rfc822 module but
that is not very good way).

I suggest that we should add special directive (let's say %o) for time
offset which is "Z" or ("+" / "-") time-hour ":" time-minute.

Also %O directive will parse zone:  ( "+" / "-" ) time-hour time-minute.
(I suppose there is no need to support obsolate time zones but if that
is possible it's also good idea).
msg97821 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-01-15 16:38
See also issue 655194.
msg97823 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-01-15 16:49
I mean issue 665194.
msg107630 - (view) Author: Alexander Belopolsky (belopolsky) * (Python committer) Date: 2010-06-12 06:26
%O is used by POSIX spec to indicate alternative locale format.

Gnu date uses %:z 

       %:z    +hh:mm numeric timezone (e.g., -04:00)

	      %::z +hh:mm:ss numeric time zone (e.g., -04:00:00) %:::z numeric
	      time  zone  with : to necessary precision (e.g., -04, +05:30)
msg185813 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2013-04-02 04:54
I've no idea if this is of any use but thought I'd reference it anyway https://pypi.python.org/pypi/strict-rfc3339
History
Date User Action Args
2014-03-13 17:43:28tinchestersetnosy: + tinchester
2014-03-11 19:24:28cvrebertsetnosy: + cvrebert
2014-02-03 18:35:32BreamoreBoysetnosy: - BreamoreBoy
2013-04-02 19:08:32berker.peksagsetversions: + Python 3.4, - Python 3.2
2013-04-02 04:54:53BreamoreBoysetnosy: + BreamoreBoy
messages: + msg185813
2010-11-18 23:41:45mihaicsetnosy: + mihaic
2010-06-12 06:26:27belopolskysetassignee: belopolsky

messages: + msg107630
nosy: + belopolsky
2010-04-09 04:09:30ezio.melottisetnosy: + ezio.melotti
2010-04-09 02:51:16eric.araujosetnosy: + eric.araujo
2010-01-15 16:49:19r.david.murraysetmessages: + msg97823
2010-01-15 16:38:06r.david.murraysetpriority: normal
versions: + Python 3.2
nosy: + r.david.murray

messages: + msg97821

stage: test needed
2009-09-17 19:01:58mribeckysetnosy: + mribecky
2009-02-10 17:06:02davydovcreate