Closed agstephens closed 3 years ago
Use of <datetime>.astimezone(datetime.timezone.utc) was failing for dates before 1800 and returning error:
<datetime>.astimezone(datetime.timezone.utc)
offset must be a timedelta representing a whole number of minutes, not datetime.timedelta(-1, 86325).
Seemed to only affect python3.6 datetime.
datetime
Tried installing newer version but did not work.
Resolved by removing use of astimezone() and instead, just add +00:00 to the end of the start time and end time before SELECTing in SQL query.
astimezone()
+00:00
Fixed in commit: https://github.com/glamod/cdm-lens/commit/bcd157e0a0398479f99ceba5d81aa78ac98c1ad0#diff-e310963ed59f56a73514e9eebdcd9b056bbf047a07b13623b2f78b00754d7b2e
Use of
<datetime>.astimezone(datetime.timezone.utc)
was failing for dates before 1800 and returning error:Seemed to only affect python3.6
datetime
.Tried installing newer version but did not work.
Resolved by removing use of
astimezone()
and instead, just add+00:00
to the end of the start time and end time before SELECTing in SQL query.Fixed in commit: https://github.com/glamod/cdm-lens/commit/bcd157e0a0398479f99ceba5d81aa78ac98c1ad0#diff-e310963ed59f56a73514e9eebdcd9b056bbf047a07b13623b2f78b00754d7b2e