Check your scheduled jobs still line up with the open after the US clock change
Cloud schedulers, cron jobs and many data feeds run in UTC, which never changes, while the US session moves an hour in UTC twice a year. A script rechecks every scheduled job around the March and November switches.
How it works
- List every scheduled part of your routine that's tied to US market hours: pre-market agent jobs, end-of-day scripts, data downloads, alert reviews, calendar blocks and reminders. Note the time zone each one is set in: New York time, your own local time, or UTC (most cloud schedulers, cron on a server and many automation tools default to UTC).
- A short script uses the standard time-zone database to convert the US session open and close (09:30 and 16:00 New York time) into UTC and into each job's own time zone for every weekday of the year, and lists the dates where that time changes.
- For example, in 2026 the US falls back on Sunday 1 November. On Friday 30 October the open is at 13:30 UTC; from Monday 2 November it is at 14:30 UTC. A pre-market job set for 13:00 UTC to arrive half an hour before the open now arrives an hour and a half before it, and an end-of-day job set for 20:15 UTC now runs before the 21:00 UTC close. In most of Arizona, which doesn't change its clocks, the open moves from 06:30 to 07:30 local time on the same day.
- For each job scheduled in your local time, the script shows when it runs relative to the session in those weeks and flags any that would run before the data it needs, or after the moment it's meant to prepare for.
- Jobs scheduled in New York time shift automatically. The script lists which of yours use which convention so you can move as many as your tools allow to New York time.
- Each January, add the two switch dates to your own calendar, with the jobs to recheck the week before.
Copy-paste prompt
Write a small Python script that checks my trading routine's schedule around daylight saving changes. It gives no trading advice and never mentions securities.
Inputs: the year {{year}} and my job list {{jobs_csv}} (job_name, scheduled_time, time_zone_it_is_set_in, for example UTC, America/Chicago or America/Phoenix, depends_on: open, close or none, margin_minutes).
The script must:
1. Use the standard time-zone database through Python's zoneinfo, not hard-coded offsets, to convert 09:30 and 16:00 America/New_York into each job's time zone for every weekday of {{year}}.
2. List the dates where the open time changes in each of those time zones.
3. For each job, show its local run time in those ranges and flag it if it would run on the wrong side of the open or close it depends on, by more than margin_minutes.
4. Print a table and a list of calendar notes for me to add myself.
It must not change any schedule. Include tests that check the open is at 13:30 UTC on 30 October 2026 and at 14:30 UTC on 2 November 2026.Guardrails
- Times come from the time-zone database in code, never from the model's memory of offsets or change dates.
- The script reports, and you change schedules yourself.
- Exchange holidays and early closes come from the exchange's own published calendar, not from the model.
- No broker connection and no orders.
What can go wrong
A cloud scheduler set in UTC is the usual culprit: the job was right when it was set up and is an hour off for the other half of the year, and nobody notices until a digest arrives late. Mixed conventions come next, with some jobs in UTC and some in New York time, so half the routine moves and half doesn't. And a model will state the wrong change date with complete confidence, which is why the dates come from code.
Why it helps
US market hours are fixed in New York time, but many of the tools that run a routine are not: cloud schedulers, cron on a rented server and plenty of automation services keep time in UTC. Twice a year the US changes its clocks and every job set in UTC moves an hour against the session: the pre-market digest arrives far too early, or the end-of-day script runs before the close. A yearly check with the dates computed in code takes a few minutes and avoids a confusing week.
How it fits with other entries
The pre-market digest (aft-0001) and the macro calendar heads-up (aft-0019) are typical jobs to put on the list. The provider-outage fallback (aft-0034) covers a different kind of disruption to the same routine; this one is predictable, so it can go in the calendar a year ahead.
Where this comes from
An original write-up by Agents for Traders. The change rules are public: in the US, clocks go forward on the second Sunday of March and back on the first Sunday of November, and most of Arizona and Hawaii don't change. The 2026 dates in the example follow from those rules. The time-zone database and the exchange calendar linked below are the sources to rely on, rather than this summary.
Source and references
Original write-up by Agents for Traders. Background reading is linked below.
- Daylight Saving Time · National Institute of Standards and Technology (checked 27 Oct 2026)
- Daylight saving time in the United States · Wikipedia (checked 19 Oct 2026)
- zoneinfo: time zone support (Python documentation) · Python Software Foundation (checked 19 Oct 2026)
- Holidays and trading hours · New York Stock Exchange (checked 19 Oct 2026)
Spotted an error, or want your post removed? Email hello@agentsfortraders.com.
Educational content only. Not investment advice or a personal recommendation. No tickers, signals or trade alerts. Trading involves risk of loss.
Conteúdo exclusivamente educativo. Não constitui aconselhamento nem recomendação de investimento. Sem tickers, sinais ou alertas de negociação. Negociar envolve risco de perda.
Related use cases
Build a private pre-market scan digest from your own written rules
A script applies the screening rules you wrote down to your own universe and computes every number. An agent groups the results and sends you a private list with chart links to review before the open.
Market context & regimeBuild a weekly macro calendar in your time zone
Each Sunday you paste that week's public economic calendar and any company-report dates for names you follow, and the agent returns a short filtered list in your time zone for you to add to your own calendar yourself.
Agent ops: guardrails & costsWrite a no-AI fallback for your routine before your model provider goes down
For each step of your routine that an agent runs, write down the manual version and how you'll know the step failed, and keep a tested second provider for the steps you rely on most. An outage then costs minutes, not your process.
The Daily 3
Three agent workflows for swing traders, free, on US trading days.