Skip to content

Add some documentation on gotchas related to pytz updates #7620 #7672

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

Merged
merged 1 commit into from
Jul 6, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2911,6 +2911,8 @@ Furthermore ``ptrepack in.h5 out.h5`` will *repack* the file to allow
you to reuse previously deleted space. Aalternatively, one can simply
remove the file and write again, or use the ``copy`` method.

.. _io.hdf5-notes:

Notes & Caveats
~~~~~~~~~~~~~~~

Expand All @@ -2933,6 +2935,13 @@ Notes & Caveats
``tables``. The sizes of a string based indexing column
(e.g. *columns* or *minor_axis*) are determined as the maximum size
of the elements in that axis or by passing the parameter
- Be aware that timezones (e.g., ``pytz.timezone('US/Eastern')``)
are not necessarily equal across timezone versions. So if data is
localized to a specific timezone in the HDFStore using one version
of a timezone library and that data is updated with another version, the data
will be converted to UTC since these timezones are not considered
equal. Either use the same version of timezone library or use ``tz_convert`` with
the updated timezone definition.

.. warning::

Expand Down
9 changes: 8 additions & 1 deletion doc/source/timeseries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,14 @@ tz-aware data to another time zone:

Be wary of conversions between libraries. For some zones ``pytz`` and ``dateutil`` have different
definitions of the zone. This is more of a problem for unusual timezones than for
'standard' zones like ``US/Eastern``.
'standard' zones like ``US/Eastern``.

.. warning::

Be aware that a timezone definition across versions of timezone libraries may not
be considered equal. This may cause problems when working with stored data that
is localized using one version and operated on with a different version.
See :ref:`here<io.hdf5-notes>` for how to handle such a situation.

Under the hood, all timestamps are stored in UTC. Scalar values from a
``DatetimeIndex`` with a time zone will have their fields (day, hour, minute)
Expand Down