frejanordsiek / hdf5storage

Python package to read and write a wide range of Python types to/from HDF5 formatted files. Can read/write data to the HDF5 based Matlab v7.3 MAT files.
BSD 2-Clause "Simplified" License
83 stars 24 forks source link

Adding support for timezone, timedelta, date, time, and datetime from the datetime module #95

Closed frejanordsiek closed 4 years ago

frejanordsiek commented 4 years ago

Adding read/write support for timezone, timedelta, date, time, and datetime from the datetime module (https://docs.python.org/3/library/datetime.html). Since the tzinfo for time and datetime can be anything that inherits from tzinfo, support will be limited to those where the instance is a timezone.

frejanordsiek commented 4 years ago

Added in commit 09dfc5fb3a6a3f9c32c2479a896c7f14d3c8d830 using the new marshaller Marshallers.PythonDatetimeObjsMarshaller. They are saves as a dict of the keyword arguments required to construct them.