-
Notifications
You must be signed in to change notification settings - Fork 523
Open
Labels
Milestone
Description
dateutil.parser.parse can parse all the time formats acceptable to Postgres except for this one:
2003-04-12 04:05:06 America/New_York
(from http://www.postgresql.org/docs/9.4/static/datatype-datetime.html#DATATYPE-DATETIME-TIME-TABLE)
>>> import dateutil.parser
>>> dateutil.parser.parse('2003-04-12 04:05:06 America/New_York')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/viktor/.virtualenvs/rewrite/lib/python3.4/site-packages/dateutil/parser.py", line 748, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/home/viktor/.virtualenvs/rewrite/lib/python3.4/site-packages/dateutil/parser.py", line 310, in parse
res, skipped_tokens = self._parse(timestr, **kwargs)
TypeError: 'NoneType' object is not iterableI tried passing a dictionary for the tzinfos parameter with a key for 'America/New_York', but it fails with the same error. I believe it fails because of the forward slash and underscore in the time zone.