Ending Daylight Saving Time in Python – How DST Ends and Affects Datetimes in 2026
Daylight Saving Time ends each fall when clocks are set back by one hour. This “fall back” transition creates a repeated hour, which can lead to duplicate timestamps in your data. In 2026, Python’s zoneinfo module automatically handles the DST end, but understanding how it works is essential for building reliable time-based features and avoiding data duplication issues.
TL;DR — DST End Rules (2026)
- United States & Canada: First Sunday in November at 2:00 AM local time → clocks fall back to 1:00 AM
- European Union: Last Sunday in October at 1:00 AM UTC → clocks fall back to 12:00 AM
- One hour is “repeated” — the same hour occurs twice
zoneinfohandles the transition automatically
1. How Python Handles DST End
from datetime import datetime
from zoneinfo import ZoneInfo
# New York DST end in 2026 (first Sunday in November)
ny_tz = ZoneInfo("America/New_York")
# Just before the fall back
before = datetime(2026, 11, 1, 1, 59, 59, tzinfo=ny_tz)
# During the repeated hour (1:00 AM happens twice)
repeated_1am = datetime(2026, 11, 1, 1, 0, 0, tzinfo=ny_tz)
print(before)
print(repeated_1am)
2. Real-World Data Science Examples
import pandas as pd
df = pd.read_csv("sales_data.csv", parse_dates=["order_time"])
# Convert to timezone-aware (zoneinfo handles DST end automatically)
df["order_time_ny"] = df["order_time"].dt.tz_convert("America/New_York")
# Detect DST end day
dst_end_day = df["order_time_ny"].dt.date == pd.Timestamp("2026-11-01").date()
print("Number of orders on DST end day:", len(df[dst_end_day]))
print("Possible duplicate hour count:", df[dst_end_day & (df["order_time_ny"].dt.hour == 1)].shape[0])
3. Best Practices in 2026
- Always use
zoneinfo.ZoneInfo— it knows exactly when DST ends - Store all internal timestamps in UTC to avoid DST-related duplication issues
- Convert to local time only for final display or user-facing reports
- Be aware that on DST end day, one hour (usually 1:00–2:00 AM) occurs twice
- Test your pipelines around DST transition dates every year
Conclusion
Understanding how Daylight Saving Time ends is just as important as knowing when it begins. In 2026, the “fall back” creates a repeated hour that can lead to duplicate timestamps in your data. Python’s zoneinfo handles this transition automatically, but you must still design your pipelines with UTC storage and proper awareness of the repeated hour to ensure accurate analytics and avoid data issues.
Next steps:
- Check your current datetime pipelines and ensure they use UTC storage and
zoneinfoto correctly handle the DST end transition