← All Posts
Automation2026-11-24

Check What Your Scheduler Stored Before the Clock Changes

How a wall-clock request becomes one instant, and three draft posts that show what your queue does at the next two clock changes

Small black alarm clock on a desk
Small black alarm clock on a desk

*Image: Small black alarm clock on a desk by Solise, licensed under CC BY 4.0.*

On 27 October 2026 the time zone database gained a line about Cuba: the country will not fall back to -05 on 1 November and plans to stay at -04 through 7 November 2027 (release 2026f; all links in this piece captured 23 November 2026). Take a post queued in Havana before that release for 09:00 on 2 November, the morning after the cancelled fall-back. Under the rule in force before the release, 09:00 local converts to 14:00 UTC. Under the new rule the same 09:00 converts to 13:00 UTC. One of those instants publishes at 09:00 local and the other at 10:00.

The post itself did not change: the copy, the account and the typed hour are identical, and the whole difference sits in the rule that turns a local hour into an instant. A calendar entry can hold both the hour a person meant and the zone whose rules apply, but the single timestamp an agent sends to a scheduler holds one instant and nothing else.

A scheduled post therefore rests on two facts that fail in different ways. The instant is fixed by the field, and the rules that produced it are revised by governments. The scheduler keeps only the instant, so the hour and zone have to live in the agent's own record, and the test below checks the code that turns one into the other.

What the timestamp carries

The scheduling example in the SMM Agent docs sends "scheduledAt": "2026-05-21T14:00:00.000Z", and the field description asks for "an ISO timestamp in the future" (posting docs). That example is an RFC 3339 timestamp, and the payload lists no field for a time zone name or for the local time as typed. In RFC 3339, "All times expressed have a stated relationship (offset) to Coordinated Universal Time (UTC)" (§1). The offset is written either as Z, which "denotes a UTC offset of 00:00" (§2), or as a numeric offset calculated as "local time minus UTC", so that 18:50:00-04:00 is the same time as 22:50:00Z (§4.2).

RFC 3339 gives the reason in its section on unqualified local time: interpretation of a bare local time "will fail in approximately 23/24 of the globe", which made the practice unacceptable for Internet protocols (§4.4). The same document recommends UTC on the ground that daylight saving rules "are so convoluted and can change based on local law at unpredictable times" (§4.1).

The posting docs add a validation rule of their own: "Schedule times must be in the future", and scheduledAt is "Required for schedule. Use an ISO timestamp in the future" (posting docs). Future is a comparison between two points, and the comparison is exact only when both points are instants. Subtracting the clock from a resolved instant produces a number. Comparing a typed wall time against a server clock in another zone produces an answer that depends on which zone each clock reads.

What the offset leaves out

An offset pins one instant and says nothing about the instant a week later, because the offset can change in between. RFC 9557, which adds a bracketed zone name to the format, states the difference. An offset "makes no claims about the UTC offset of other related timestamps", which makes it unsuitable for local-time operations such as "one day later" (RFC 9557 §1.2). A named zone is a ruleset, and the same section says that using the name means "the intent is for the rules that are current at the time of interpretation to apply" (§1.2).

A weekly 09:00 post is a recurrence in local time. Reusing last week's offset gives the right instant in most weeks. When a transition falls between two occurrences, the reused offset fires the next one an hour off unless it is recalculated. With the zone name, each occurrence resolves under whatever rule is current when it is computed. The posting API has no recurrence field, so whoever generates the series, the agent or a cron job, does that calculation.

The Havana change shows the mechanism at work. A document published on 27 October changed a prediction for 1 November, five days later (release 2026f). RFC 3339 describes the general form: in scheduling applications "a local time and location may be known, but the actual relationship to UTC may be dependent on the unknown or unknowable actions of politicians or administrators", and "The UTC time corresponding to 17:00 on 23rd March 2005 in New York may depend on administrative decisions about daylight savings time" (§1).

RFC 9557 also scopes out "future time given as a local time in some specified time zone, where changes to the definition of that time zone ... affect the instant in time represented by the timestamp" (§1.1). A zone suffix improves the record without making a far-future local time immune to a rule change, and the standards do not pretend otherwise.

The hours that vanish or repeat

Most local times map to exactly one instant. Two kinds do not, and both occur at a clock change. When clocks move forward, a stretch of local time is skipped. When they move back, a stretch happens twice. PEP 495 names the two cases: "A local time that falls in the fold is called ambiguous. A local time that falls in the gap is called missing" (PEP 495).

In New York the next change is on 14 March 2027, when daylight time begins at 2 a.m. on the second Sunday of March under the federal statute (15 U.S.C. 260a). An agent asked to post at 02:30 that morning in America/New_York has to convert a time the clock skips. Python's zoneinfo module, which follows the PEP 495 rules, illustrates the result:

>>> from datetime import datetime, timezone
>>> from zoneinfo import ZoneInfo
>>> new_york = ZoneInfo("America/New_York")
>>> gap = datetime(2027, 3, 14, 2, 30, tzinfo=new_york)
>>> gap.astimezone(timezone.utc)
datetime.datetime(2027, 3, 14, 7, 30, tzinfo=datetime.timezone.utc)

The result is 07:30 UTC, which reads back as 03:30 local, an hour later on the clock than the 02:30 that was requested. The fold flag changes the answer: the same 02:30 with fold=1 resolves to 06:30 UTC, which reads back as 01:30 local. PEP 495 sets the rule for a missing time: the rules in effect before the transition apply at fold=0, and the rules in effect after it at fold=1 (PEP 495). The module exposes the same flag for times that repeat (zoneinfo). The same typed hour therefore produces two defensible instants.

November gives the mirror case: daylight time ends at 2 a.m. on the first Sunday of November, so on 7 November 2027 the clock reads 01:30 twice in New York. The first reading is 05:30 UTC, still on daylight time at -04. The second is 06:30 UTC, on standard time at -05. A screen that renders either instant back into local time shows 01:30 both times.

The zone name alone does not settle which reading applies. The offset does: 01:30-04:00 and 01:30-05:00 are different instants, which is what RFC 3339 means by a timestamp, "an unambiguous representation of some instant in time" (§2). The choice is made wherever a local time and zone name become an offset. For this API that is the agent's conversion code, before the request is sent. That choice belongs somewhere an operator can read, because code that takes the first reading and code that takes the second publish an hour apart from the same request.

Three draft posts

The API never sees a gap or a fold, because scheduledAt arrives already resolved. The test therefore targets the code that turns a typed hour and zone name into that timestamp, in the agent or in any interface that accepts local time plus zone. The conversions run locally and need no API call. Save the three posts as drafts, the default intent, so nothing reaches an audience: "Agents should create drafts first. Publishing is a separate explicit call" (posting docs). The docs require scheduledAt only for intent: "schedule" and do not say whether a draft stores or validates it, so a draft call may not exercise the scheduling path at all. A schedule call does reach it, and it "queues a future post". If you want the server to see the timestamps, target a channel in your workspace that no audience follows and plan to remove the posts yourself, since the docs describe no cancel call.

  1. Control. Convert 09:00 two days out in your own zone and log the result. From 23 November, a post at 09:00 on 25 November in New York is 14:00 UTC at -05, and a logged 2026-11-25T14:00:00.000Z matches the arithmetic. Then check that the agent's own record kept the typed 09:00 and the zone name beside the timestamp, since the API has no field for either.
  2. Gap. Convert 02:30 on 14 March 2027 in America/New_York. The common outcomes are that the code rejects the time, produces 07:30 UTC, or produces 06:30 UTC. Each is defensible once it is stated, and a silent shift is the failure this test looks for.
  3. Fold. Convert 01:30 on 7 November 2027 in the same zone and read the logged timestamp. 05:30 UTC is the first reading, 06:30 UTC the second. Run it twice to check that the choice stays the same across runs and request orders.

Read the logged timestamp with its offset. A confirmation screen that shows only local time renders the two fold instants as the same 01:30, while the offsets tell them apart.

Then decide from the results: code that rejects the gap needs a fallback hour for posts near a transition. Code that shifts is acceptable once the shift is written down, with its direction and the resulting local hour logged beside the typed one, so an operator can explain a post that lands at 03:30. Code that returns the same fold instant on both runs has a deterministic choice worth writing into the runbook.

What to keep in the record

Three fields make a schedule reproducible: the resolved instant in UTC, the IANA zone name, and the local time as typed. The instant is what the queue fires on, the zone name is what makes next week's recurrence correct, and the typed hour is what lets someone reconstruct the intent when a post lands at an odd time. The API stores the first, and the agent's own record has to hold the other two.

The typed hour and a display string are different things. The typed hour records what the person asked for and is the input for recomputing the instant, so it stays in the record unchanged. A display string is a local time rendered from the instant for a screen. Rendered at write time and stored as text, it loses the zone and goes stale when the rules change. Rendered at read time from the instant and the zone name, it shows when the post will actually fire, even after a rule change. That is the firing time, which can differ from the intent: the Havana post resolved at 14:00 UTC under the old rule renders as 10:00 under the new one, while the typed hour still says 09:00. The calendar view should derive its display from the instant and the zone name and skip storing a pre-rendered display string beside them. Comparing that derived display with the typed hour is how the agent spots a post that a rule change has moved.

Rule changes start reaching software when the database publishes them. Its home page describes the database as "updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight-saving rules", and says end users typically receive those updates through their software and operating system vendors (IANA time zones). The 2026f release gave five days of notice for Cuba, and any delay at the vendor comes out of that window. A queue that fires on a pinned instant will not move when the rules change. That instant stays faithful to what was sent, but after a change like Cuba's it may no longer land on the hour the person meant, as the Havana post firing at 10:00 shows. The stored zone name and typed hour are what let the agent recompute the instant. The docs describe no call for editing a queued post, so work out how you would replace one before a change forces it.

A far-future local time stays a prediction, and keeping the zone name is what lets the prediction be recomputed. Re-check any schedule that crosses a transition date before it fires.

Pick the next transition on the calendar, run the three conversions, and read the agent's log. Do it before the next change, so the first post that crosses a transition is one you have already tested.

Ready to automate your social posting?

Sign in to create, schedule, publish, and get help from the dashboard.

Start using SMM Agent
Check What Your Scheduler Stored Before the Clock Changes — SMM Agent | SMM Agent