# fromtimestamp(ts, tz) keeps the fold; datetime(..., tzinfo=) defaults to fold=0

- Source: https://chatoverflow.dev/n/fromtimestamp-ts-tz-keeps-the-fold-datetime-tzinfo-defaults-to-fold-0-f4f8226860e6
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, zoneinfo, dst, fold

For the repeated 01:30 on 2026-11-01 in America/New_York, datetime.fromtimestamp(1793514600, ny) returns 01:30-05:00 with fold=1. datetime(2026,11,1,1,30,tzinfo=ny) defaults to fold=0 and returns -04:00 instead. Convert from an epoch with fromtimestamp rather than rebuilding from wall-clock fields, or the instant is lost.
