{"uid":"cap_EO-nH3SqvV03xGCBlW-Y1","slug":"duo-data-utilities-time-zone-conversion-d9e2a5dd","name":"Duo Data Utilities – Time Zone Conversion","description":"Convert an instant to wall-clock time in a named IANA time zone, or a wall-clock time in a zone back to an instant. Returns the local date and time, the UTC offset in ±HH:MM and seconds, the zone abbreviation, whether DST is in effect, the ISO week date, and the day of year. Handles the ambiguous and skipped local times at DST boundaries explicitly rather than guessing.","url":"https://api.duoleads.com/v1/time/zone?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["zone"],"properties":{"zone":{"type":"string","maxLength":64,"description":"IANA time zone id, e.g. Europe/Amsterdam."},"local":{"type":"string","maxLength":64,"description":"Wall-clock time YYYY-MM-DDTHH:MM[:SS] in zone, converted back to an instant. Mutually exclusive with instant."},"instant":{"type":"string","maxLength":64,"description":"RFC 3339 timestamp or integer Unix seconds/milliseconds. Defaults to now. Mutually exclusive with local."},"ambiguous":{"enum":["earlier","later","reject"],"type":"string","maxLength":64,"description":"Only with local: which instant a repeated local time maps to. Default earlier."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["ok","route","version","data","meta"],"properties":{"ok":{"const":true},"data":{"type":"object","required":["zone","instant","epoch_ms","local","offset","offset_seconds","abbreviation","dst","weekday","iso_week","day_of_year","ambiguity","resolution"],"properties":{"dst":{"type":"boolean"},"gap":{"type":"boolean"},"zone":{"type":"string"},"local":{"type":"string"},"offset":{"type":"string"},"instant":{"type":"string"},"weekday":{"type":"string"},"epoch_ms":{"type":"integer"},"iso_week":{"type":"object","required":["year","week","weekday"],"properties":{"week":{"type":"integer"},"year":{"type":"integer"},"weekday":{"type":"integer"}}},"ambiguity":{"type":["string","null"]},"resolution":{"type":["string","null"]},"day_of_year":{"type":"integer"},"abbreviation":{"type":"string"},"offset_seconds":{"type":"integer"}}},"meta":{"type":"object","required":["request_id","computed_at","price_usd","deterministic","disclaimer"],"properties":{"sources":{"type":"array","items":{"type":"object","required":["id","version","published"]}},"price_usd":{"type":"string"},"disclaimer":{"type":"string"},"request_id":{"type":"string"},"computed_at":{"type":"string","description":"RFC 3339 UTC with milliseconds"},"deterministic":{"type":"boolean"}}},"route":{"const":"/v1/time/zone"},"version":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"dst":true,"gap":false,"zone":"Europe/Amsterdam","local":"2026-10-25T02:30:00","offset":"+02:00","instant":"2026-10-25T00:30:00.000Z","weekday":"sunday","epoch_ms":1792888200000,"iso_week":{"week":43,"year":2026,"weekday":7},"ambiguity":null,"resolution":null,"day_of_year":298,"abbreviation":"GMT+2","offset_seconds":7200},"meta":{"price_usd":"0.05","disclaimer":"Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms","request_id":"01K6B7Q4ZC8H3F2M9WXR5TYN0D","computed_at":"2026-09-28T12:00:00.000Z","deterministic":true},"route":"/v1/time/zone","version":"1.0.0"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Spkqb4BzOJjHwFjwRJPES","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts an instant to wall-clock time in a named IANA time zone, or a local wall-clock time back to an instant, with full DST boundary handling and rich calendar metadata.","exampleAgentPrompt":"What is the local time and UTC offset in America/New_York for the instant 2026-03-08T06:30:00Z, and is DST in effect?","exampleUseCases":[{"title":"Scheduling a global team meeting","prompt":"I need to tell my team in Tokyo what time our 3pm London meeting will be on June 15, 2027 — can you convert 2027-06-15T14:00:00Z to local time in Asia/Tokyo and tell me the UTC offset?"},{"title":"Logging a DST boundary event correctly","prompt":"Our system logged a local timestamp of 2026-10-25T02:30:00 in Europe/Amsterdam right at the DST fall-back. Can you resolve that to a UTC instant using the earlier occurrence and give me the epoch milliseconds?"},{"title":"Displaying current local time in a user's city","prompt":"What is the current wall-clock time, time zone abbreviation, and day of year right now in Australia/Sydney?"}],"resultDescription":"A JSON object with: local datetime string, UTC offset in ±HH:MM and integer seconds, zone abbreviation (e.g. CET), DST boolean, gap/fold booleans for boundary detection, ambiguity and resolution fields, ISO week (week number, year, weekday), day of year, and Unix epoch milliseconds. Also includes a meta block with request ID, computation timestamp, price, and determinism flag.","failureModes":["Unknown or invalid IANA zone name returns a 4xx error","Providing both 'instant' and 'local' simultaneously is rejected as mutually exclusive","A skipped local time (spring-forward gap) with ambiguous=reject returns an explicit error rather than guessing","Malformed RFC 3339 or non-numeric epoch string causes a validation error","Missing required 'zone' parameter returns a schema validation error"],"whenToPreferThis":"Choose this endpoint when you need authoritative DST-aware timezone conversion with explicit handling of ambiguous and skipped local times — rather than relying on client-side libraries that may have stale timezone data or silently guess at DST boundaries. Ideal when you need the full suite of calendar metadata (ISO week, day of year, UTC offset in seconds) in a single deterministic call at a low fixed cost of $0.05 USDC.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T04:17:20.301Z","isFirstParty":false,"canonicalSlug":"duo-data-utilities-time-zone-conversion-d9e2a5dd"}