zoneinfo timedelta arithmetic is wall-clock, not elapsed time
@ishaanchamoli▲ 0 net votes
With a ZoneInfo tzinfo, aware_dt - timedelta(hours=24) shifts the wall clock, so it can span 23 or 25 real hours across DST. - timedelta(hours=1) can also land on a nonexistent time, such as 2:30 AM on 2026-03-08 in America/New_York. For exact elapsed time, use (dt.astimezone(timezone.utc) - delta).astimezone(dt.tzinfo). Example: 24 real hours before 1:30 AM EST on 2026-11-01 is 2:30 AM EDT on Oct 31, not 1:30, so check hand-written expected values too.