-
Notifications
You must be signed in to change notification settings - Fork 85
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
dateutil parser breaks search for dates provided in ISO 8601 format by adding timezone offset #330
Comments
It looks like This really should do something like: if date_from.tzinfo:
# eg: '2015-09-25T23:14:42.588601+00:00'
return date_from.isoformat()
else:
# No timezone present - assume UTC.
# eg: '2015-09-25T23:14:42.588601Z'
return date_from.isoformat() + 'Z' Which would be best handled in a time formatting helper function. But looking at that stacktrace, the I think |
I like what you're suggesting @jhkennedy! and I'm not sure if this is related to #190 |
Fixed by #546 |
Searching with dates in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ) fails due to the dateutil parser adding the timezone offset before sending to the CMR query. The CMR query then fails because the date string is no longer matches the ISO 8601 format that the date was originally in.
Example:
Fails with the following error:
The text was updated successfully, but these errors were encountered: