Repository navigation
BUG: keep the year of a tz-aware Timestamp outside 1-9999 when converting to datetime64 (GH#71371) - #1877
BUG: keep the year of a tz-aware Timestamp outside 1-9999 when converting to datetime64 (GH#71371)#1877xirafa wants to merge 3 commits into
Conversation
…_datetime (GH#71371)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
491a8aa to
42cbbed
Compare
…timeIndex dtypes (GH#71371) The array_to_datetime fix only covered object-dtype input. With an explicit datetime64[us, UTC] dtype the values go through array_to_datetime_with_tz -> convert_datetime_to_tsobject, which rebuilt the datetimestruct from the py datetime fields, where the year is a placeholder outside 1-9999. Use _value (already UTC in the Timestamp's own resolution) for Timestamp inputs that carry a tz or are naive with no target tz, and derive dts from it. Adds coverage for pd.Series, Series.astype, DatetimeIndex and pd.array.
Mirror of pandas-dev/pandas#72195. Runs the pandas test suite through dagz.
Summary by CodeRabbit