Skip to content

Problem with datetime and HDFStore #809

@mattias-lundell

Description

@mattias-lundell

When storing a DataFrame using HDFStore the datetime information is altered. My guess is that there is some problem with daylight saving and time zones when the DataFrame is loaded from the h5 file. An example:

In [1]: from pandas import *

In [2]: df = DataFrame([0,1], [datetime(2011, 3, 27, 2, 2, 2),datetime(2011, 3, 27, 3, 2, 2)])

In [3]: s = HDFStore("test.h5")

In [4]: s["test"] = df

In [5]: df
Out[5]: 
                     0
2011-03-27 02:02:02  0
2011-03-27 03:02:02  1

In [6]: s["test"]
Out[6]: 
                     0
2011-03-27 03:02:02  0
2011-03-27 03:02:02  1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions