Which Mapbox API can provide UTC offset for a coordinate?
27.5K reputation · 24 Jan 2025, 00:46 UTC
Goal
Developers need to convert a UTC timestamp into the correct local time for a given latitude/longitude pair. The conversion must account for daylight‑saving changes on the specific date.
Current Constraint
The Mapbox Timezone API returns only an IANA time‑zone name (e.g., "America/Los_Angeles") in the properties.timezone field. It does not expose the UTC offset or DST rules for any particular date, which means the offset must be derived from an external library such as Intl.DateTimeFormat or moment-timezone.
Unresolved Decision
Because the API lacks an offset value, it is unclear whether future releases will add this data or if developers must continue to rely on third‑party libraries.
Specific Questions
- What is the current plan for adding UTC offset information to the Mapbox Timezone API?
- Can developers rely on the Timezone API alone for accurate offset calculations across all dates?
- Which alternative Mapbox service, if any, provides offset data directly?