Timezone Resolver

Convert geographic coordinates to timezone data with UTC offset, DST status, and next transition. Offline-capable with sub-50ms response.

POST /api/timezone
Validation
<50ms avg latency
API Key auth
Offline-capable

What it does

The Timezone Resolver API takes latitude and longitude coordinates and returns comprehensive timezone information including the IANA timezone identifier, current UTC offset, daylight saving time (DST) status, and the next DST transition timestamp. Perfect for applications that need to display local times or schedule events across global locations.

Offline-capable DST-aware Global coverage Sub-50ms response

Description

The Timezone Resolver API provides accurate timezone lookups for any location on Earth. By passing geographic coordinates (latitude and longitude), you'll receive detailed timezone information including:

  • IANA Timezone Identifier — Standard timezone names like "America/New_York" or "Europe/London"
  • UTC Offset — Current offset from UTC in hours and minutes
  • DST Status — Whether daylight saving time is currently active
  • Next Transition — Timestamp of the next DST change (start or end)

The API uses embedded GeoTimeZone shape data, meaning it works entirely offline without external API dependencies. This ensures sub-50ms response times and 100% reliability regardless of external service availability.

Code Examples

curl -X POST https://api.atomicapis.dev/api/timezone \
  -H "X-RapidAPI-Proxy-Secret: YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "latitude": 40.7128,
    "longitude": -74.006
  }'

Request Parameters

Parameter Type Required Description Example
latitude double Yes Geographic latitude, -90 to 90 40.7128
longitude double Yes Geographic longitude, -180 to 180 -74.006

Response Format

Response Schema

Field Type Description
latitude number The latitude from the request
longitude number The longitude from the request
ianaTimezone string IANA timezone identifier
utcOffset string UTC offset as string (e.g., "-05:00")
utcOffsetSeconds number UTC offset in seconds
isDst boolean Whether DST is currently active
currentLocalTime string Current local time in ISO 8601 format
nextTransition string|null ISO 8601 timestamp of next DST change

Example Response

application/json
{
  "latitude": 40.7128,
  "longitude": -74.006,
  "ianaTimezone": "America/New_York",
  "utcOffset": "-05:00",
  "utcOffsetSeconds": -18000,
  "isDst": false,
  "currentLocalTime": "2024-01-15T10:30:00-05:00",
  "nextTransition": null
}

Use Cases

Global Event Scheduling

Automatically convert event times to attendees' local timezones. Display "9:00 AM in your timezone" based on user location.

// Display local event time
"Meeting at 2PM UTC"
→ "10:00 AM EST"

Travel Apps

Show destination timezone, jet lag calculations, and local time differences for travelers planning trips across timezones.

// Flight arrival display
"Lands 6:30 PM local time
(12 hours ahead)"

Log Timestamp Conversion

Convert UTC timestamps from server logs to local time for analysis and reporting based on the geographic origin of requests.

// Log analysis
"2024-01-15T14:30:00Z"
→ "9:30 AM CST"

Build Constraints

Technical Implementation

The Timezone Resolver is built for maximum performance and reliability with the following technical constraints:

  • Offline GeoTimeZone Shape Data

    Embedded shapefile data from the GeoTimeZone library ensures zero external dependencies and sub-50ms response times.

  • TrimmerRootAssembly Optimization

    Assembly trimming reduces binary size by ~60% while maintaining full functionality for serverless deployments.

  • Binary Search for DST Transitions

    O(log n) lookup for DST transition dates using pre-computed transition tables. Handles all historical and future transitions.

MCP Integration MCP Ready

What is MCP?

Model Context Protocol (MCP) allows AI assistants like Claude to call this API as a native tool during conversation. Instead of writing HTTP requests, the AI invokes the tool directly — no API keys or boilerplate needed on the client side.

Tool Details

Tool Class
TimezoneTools
Method
ResolveTimezone()

Description

Converts latitude/longitude coordinates to full timezone data