Resolve timezone
GET /v1/timezoneOpenAPI YAMLCanonical IANA timezone for an IP or coordinate, with current offset and DST flag.
What do I need to send?
Provide one selector: tz, ip, lat + lon, or offset.
sign is optional.
Rule: offset returns matching zones; ip and coordinates resolve to a canonical IANA timezone.
| Name | Needed? | Use it for |
|---|---|---|
tz | Choose one target | IANA timezone to resolve directly. |
ip | Choose one target | IPv4 or IPv6 (resolved via GeoLite2). |
lat | Pair parameter | Latitude. Pair with lon. |
lon | Pair parameter | Longitude. |
offset | Choose one target | Fixed UTC offset for matching zones (URL-encode + as %2B). |
sign | Optional | Set true for a signed response. |
Code samples
Copy a request in your preferred language and replace YOUR_TIMELOGIC_API_KEY with your direct API key.
curl "https://api.timelogicapi.com/v1/timezone?ip=8.8.8.8" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"Example response
{
"unix": 1778093027,
"unix_ms": 1778093027712,
"utc": "2026-05-06T18:43:47Z",
"iso_local": "2026-05-06T20:43:47+02:00",
"rfc2822": "Wed, 06 May 2026 20:43:47 +0200",
"human": "May 6, 2026, 8:43 PM Europe/Paris",
"day_number": 4,
"day_short": "Wed",
"day_full": "Wednesday",
"timezone": "Europe/Paris",
"offset": 120,
"dst": true
}
Additional endpoint notes
offset is the current UTC offset in minutes. timezone is the canonical IANA name.
https://api.timelogicapi.com/v1/timezone?ip=8.8.8.8
https://api.timelogicapi.com/v1/timezone?lat=48.8566&lon=2.3522
IP resolution uses MaxMind GeoLite2.
When to use this endpoint
Use Resolve timezone when you need to turn an IP address or latitude/longitude pair into a canonical IANA timezone. It is useful for onboarding, personalization, analytics enrichment, and timezone-aware defaults.
Request model
Provide either ip or the lat + lon pair. The endpoint returns the resolved IANA name, current local time, UTC offset in minutes, and a DST flag for the resolved zone.
Accuracy guidance
Coordinate resolution is usually the most explicit option. IP-based resolution is convenient for defaults, but users should be able to override it when precision matters.