[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2009-02-10 Thread Iakov Davydov

New submission from Iakov Davydov :

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).

--
components: Library (Lib)
messages: 81565
nosy: davydov
severity: normal
status: open
title: extend strftime/strptime format for RFC3339 and RFC2822
type: feature request

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



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2014-06-16 Thread Iakov Davydov

Iakov Davydov added the comment:

ISO 8601 is meant as the standard way to provide an unambiguous and 
well-defined method of representing dates and times. And the fact that it is 
widely used in e-mails doesn't make it e-mail specific.

Incorporating function parsedate_to_datetime to email.util is acceptable. But 
the fact that standard python datetime library doesn't have means to parse 
ISO-approved time format seems strange to me.

Once again: ISO 8601 is not a e-mail specific format. So I do not see a reason 
why parsing it is possible only via email.

Using different time-parsing functions in different libraries seems like a bad 
design to me.

--

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



[issue5207] extend strftime/strptime format for RFC3339 and RFC2822

2014-06-16 Thread Iakov Davydov

Iakov Davydov added the comment:

I took a closer look for #15873. Apperently it solves the issue.
Thanks, David.

--

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2014-06-16 Thread Iakov Davydov

Changes by Iakov Davydov :


--
nosy: +davydov

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