Skip to content

API/BUG: different constructor behavior for numpy vs pyarrow dt64tzs #61775

Open
@jbrockmendel

Description

@jbrockmendel
import pandas as pd

dtype1 = "datetime64[ns, US/Eastern]"
dtype2 = "timestamp[ns, US/Eastern][pyarrow]"

ts = pd.Timestamp("2025-07-03 18:10")

>>> pd.Series([ts], dtype=dtype1)[0]
Timestamp('2025-07-03 18:10:00-0400', tz='US/Eastern')

>>> pd.Series([ts], dtype=dtype2)[0]
Timestamp('2025-07-03 14:10:00-0400', tz='US/Eastern')

Long ago we decided that when passing tznaive datetimes and specifying a tzaware dtype, we treat the input as a wall-time. It looks like the pyarrow path (which I'm pretty sure just ends up calling pa.array([ts], type=...)) treats it as a UTC time.

cc @jorisvandenbossche

Metadata

Metadata

Assignees

No one assigned

    Labels

    API - ConsistencyInternal Consistency of API/BehaviorArrowpyarrow functionalityBug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions