This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: ISO 8601 datetime process
Type: behavior Stage: resolved
Components: Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: SilentGhost, Stoneagee, belopolsky
Priority: normal Keywords:

Created on 2015-02-15 18:46 by Stoneagee, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg236059 - (view) Author: Stoneagee (Stoneagee) Date: 2015-02-15 18:46
Code:
import dateutil.parser
from datetime import datetime

a='0001-01-01T00:00:00+02:00'
b='1964-01-01T00:00:00+02:00'
ia=dateutil.parser.parse(a)
ib=dateutil.parser.parse(b)
print a
print ia
print b
print ib

output:
0001-01-01T00:00:00+02:00
2001-01-01 00:00:00+02:00
1964-01-01T00:00:00+02:00
1964-01-01 00:00:00+02:00

On wiki ISO 8601, under Combined date and time representations:
If a time zone designator is required, it follows the combined date and time. For example "2007-04-05T14:30Z" or "2007-04-05T12:30-02:00"

I know you may have to fall back template on date such as 1/1/1, but this is ISO and according to my reading, it does not require one.

BTW, my input comes from public posted information.

Thanks,
msg236061 - (view) Author: SilentGhost (SilentGhost) * (Python triager) Date: 2015-02-15 19:31
Perhaps I'm misinterpreting your message, but this doesn't seem like a problem with datetime module. The issue is with dateutil module, which is not the part of the standard library and is not developed here. Also, I can reproduce this issue on 3.4 (though I doubt it's awfully relevant).
History
Date User Action Args
2022-04-11 14:58:12adminsetgithub: 67656
2015-02-15 22:19:45belopolskysetstatus: open -> closed
resolution: third party
stage: resolved
2015-02-15 19:31:00SilentGhostsetnosy: + SilentGhost
messages: + msg236061
2015-02-15 19:08:18serhiy.storchakasetnosy: + belopolsky
2015-02-15 18:46:48Stoneageecreate