-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong datetime return #21
Comments
Hi, "04-05-2015T14:32:00Z-09:00" this is a malformed iso date string. The order of year, month, day is incorrect, and you have two time zone specifications in it 'Z' and '-09:00'. I'll try to let the parser raise an exception. |
Releated to #15 |
Related- timezones don't seem to ever parse, except for the Z timezone specification. This is an example, tested against isodate 0.6.0:
This should be returning a non-naive datetime with tzinfo on it, but it returns a naive datetime anyway. Not that it should matter but America/Chicago is the local timezone of the system. Is this project still maintained @gweis? |
@estein-de This is malformed TZ spec. it should be "2019-03-20T13:30:00-05:00" (two digit hours in TZ spec. (so still related to #15) Ad maintenance: It is still sort of maintained. There are a couple of issues I'd like to address, but I am a bit low on free time currently. |
Oh thanks , #15 does seem like what I want - because then I would know it was malformed, the scary part is invalid data being misinterpreted |
Can confirm, working fine with 2 digit hour
|
In [1]: import isodate
In [2]: isodate.parse_datetime("04-05-2015T14:32:00Z-09:00")
Out[2]: datetime.datetime(401, 1, 1, 14, 32, tzinfo=<isodate.tzinfo.Utc object at 0x7fd4b4c46080>)
The text was updated successfully, but these errors were encountered: