{"uid":"cap_pqA_AUW0XEabj-XyaBeoC","slug":"date-math-dst-timezone-clock-change-lookup-22dcc93f","name":"Date Math: DST & Timezone Clock Change Lookup","description":"Date Math: Daylight saving time for a time zone: does it observe DST, the year's exact clock changes (UTC instant, local before/after), and whether a local time is valid, skipped (spring-forward gap, e.g. 02:30) or repeated (fall-back, happens twice). Use before scheduling jobs, alarms or meetings near clock changes.","url":"https://date-math.datemath.workers.dev/v1/dst?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"year":{"type":"integer","maximum":2100,"minimum":1900,"description":"Year to list (default: the datetime's year, else the current year)"},"datetime":{"type":"string","example":"2026-03-08T02:30","description":"Local wall time to check, without offset: YYYY-MM-DDTHH:MM[:SS]"},"timezone":{"type":"string","example":"Asia/Manila","description":"IANA time zone, e.g. Asia/Manila"}}},"responseSchema":{"type":"json","example":{"year":2026,"check":{"note":"This local time does not exist: clocks jump forward 60 minutes. Most systems shift it forward to 03:30.","local":"2026-03-08T02:30:00","status":"skipped","instants":[],"resolved":"2026-03-08T03:30:00-04:00"},"timezone":"America/New_York","dst_offset":"-04:00","transitions":[{"type":"clocks_forward","at_utc":"2026-03-08T07:00:00Z","local_after":"2026-03-08T03:00:00-04:00","local_before":"2026-03-08T02:00:00-05:00","offset_after":"-04:00","offset_before":"-05:00","change_minutes":60}],"observes_dst":true,"standard_offset":"-05:00"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tYCRCuuUJWfD4EaEO5Usi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns DST observance, annual clock-change transitions, and validity status of a local time (valid, skipped, or repeated) for a given IANA timezone.","exampleAgentPrompt":"Is 2:30 AM on March 8, 2026 a valid local time in America/New_York, or does it fall in the spring-forward gap? Also tell me exactly when the clocks change that day.","exampleUseCases":[{"title":"Validate cron job time near DST change","prompt":"I have a job scheduled to run at 2:30 AM on March 8, 2026 in the America/Chicago timezone — will that time actually exist, or will it be skipped because of daylight saving? If it's skipped, what will it resolve to?"},{"title":"Find exact DST transition moment for scheduling","prompt":"What are the exact UTC timestamps when clocks spring forward and fall back in Europe/London for 2025? I need the local times before and after each change too."},{"title":"Check if timezone observes DST at all","prompt":"Does Asia/Manila observe daylight saving time? I'm building a scheduler and need to know if I have to worry about clock changes there."}],"resultDescription":"A JSON object containing: whether the timezone observes DST, its standard and DST UTC offsets, an array of clock-change transition events for the year (each with UTC instant, local time before/after, offsets before/after, and direction), and if a datetime was supplied, a check object showing whether that local time is valid, skipped (spring-forward gap), or repeated (fall-back ambiguity), along with possible UTC instants and the resolved canonical time.","failureModes":["Invalid or unrecognized IANA timezone string returns an error","Malformed datetime string (wrong format or out-of-range values) returns a validation error","Year outside 1900–2100 range is rejected","Missing required timezone field causes a 400-level error","Network timeout on the Workers.dev edge function"],"whenToPreferThis":"Use this endpoint when you need to reason about daylight saving time transitions for a specific timezone — especially before scheduling jobs, alarms, meetings, or cron expressions near clock-change boundaries. It is specifically designed to surface skipped (spring-forward) and repeated (fall-back) local times, which most general datetime libraries handle inconsistently. Prefer this over a general date arithmetic endpoint when the DST validity of a specific local wall time is the core question.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T12:35:59.981Z","isFirstParty":false,"canonicalSlug":"date-math-dst-timezone-clock-change-lookup-22dcc93f"}