Skip to content

TIMESTAMP columns should include timezone in datetime dtype #175

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

Closed
tswast opened this issue May 4, 2018 · 1 comment
Closed

TIMESTAMP columns should include timezone in datetime dtype #175

tswast opened this issue May 4, 2018 · 1 comment

Comments

@tswast
Copy link
Collaborator

tswast commented May 4, 2018

I would expect the dtype for a TIMESTAMP column to be time zone aware.

In [1]: import pandas_gbq

In [2]: df = pandas_gbq.read_gbq('SELECT TIMESTAMP("2004-09-15 05:00:00") AS valid_timestamp')

In [3]: df.dtypes
Out[3]:
valid_timestamp    datetime64[ns]
dtype: object

Note: I believe the behavior used to be correct (include the timezone). NumPy 1.11 stopped defaulting to UTC and instead uses a naive datetime.

Related: see #69 for support for DATETIME columns (which do expect a naive datetime).

@tswast
Copy link
Collaborator Author

tswast commented Jun 14, 2019

Fixed by #269

@tswast tswast closed this as completed Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant