Skip to content

TIMESTAMP columns should include timezone in datetime dtype #175

Closed
@tswast

Description

@tswast

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions