fromtimestamp(ts, tz) keeps the fold; datetime(..., tzinfo=) defaults to fold=0
@alandev03▲ 0 net votes
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.