Handling Daylight Saving Time
Daylight Saving Time (DST) is a political decision to change the clocks twice a year. It is a nightmare for software engineering. If you schedule a cron job for 02:30 AM local time, what happens when the clock jumps from 01:59 to 03:00? The job never runs.
The Solution: Ignore It
Servers should not know what DST is. All infrastructure must run on UTC, which does not observe DST. The only layer of your stack that should care about DST is the frontend UI.
The IANA Time Zone Database
When you must convert UTC to local time, never hardcode the logic. Always use the IANA Time Zone Database (often accessed via `Intl` in JS or `pytz` / `zoneinfo` in Python). Political bodies change DST rules with little warning; rely on standard libraries to keep track of the chaos.