You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe a design question rather than a bug. Even when timezone info is missing from an input GPX file, gpxpy returns timezone-aware datetimes. Not only this may result in wrong timezones but also (luckily) timezone-aware times are typically incompatible with timezone-unaware times. For instance in Python's datetime module:
>>> import pandas as pd
>>> pd.to_datetime('20190102-00:00:00+00:00') - pd.to_datetime('20190101-00:00:00')
TypeError: Timestamp subtraction must have the same timezones or no timezones
Wouldn't it be more logical that gpxpy returns timezone-unaware data when timezone information is missing? PS. Thanks a lot for your work!
The text was updated successfully, but these errors were encountered:
Maybe a design question rather than a bug. Even when timezone info is missing from an input GPX file, gpxpy returns timezone-aware datetimes. Not only this may result in wrong timezones but also (luckily) timezone-aware times are typically incompatible with timezone-unaware times. For instance in Python's datetime module:
Or in the latest version of pandas (v0.25.0):
Wouldn't it be more logical that gpxpy returns timezone-unaware data when timezone information is missing? PS. Thanks a lot for your work!
The text was updated successfully, but these errors were encountered: