man-group / arctic

High performance datastore for time series and tick data
https://arctic.readthedocs.io/en/latest/
GNU Lesser General Public License v2.1
3.06k stars 583 forks source link

fix: Handle index timezones of dateutil.timezone.tzutc() #1013

Closed lwfitzgerald closed 1 year ago

lwfitzgerald commented 1 year ago

Due to an earlier change in this area, a regression was introduced where dateutil.timezone.tzutc() was serialized as the string "tzutc()". pandas is unable to create a timezone from this, so data could not be reconstructed.

This change restores the old behaviour where dateutil.timezone.tzutc() is serialized as the string "UTC".

Another prior fix to consistently serialize dateutil.timezone.gettz("UTC") for multi-level indexes is also extended in this change to cover single level indexes.