Call the free ip_datetime api endpoint
Put the address in the path:
curl https://aisenseapi.com/services/v1/ip_datetime/8.8.8.8{
"ip": "8.8.8.8",
"datetime": "2026-10-03T05:41:07-05:00",
"timezone": "America/Chicago",
"abbreviation": "CDT",
"utc_offset": "-05:00",
"dst": true,
"unixtime": 1791024067,
"raw_offset": -21600,
"dst_offset": 3600,
"dst_from": "2026-03-08T08:00:00+00:00",
"dst_until": "2026-11-01T07:00:00+00:00",
"day_of_week": 6,
"day_of_year": 276,
"week_number": 40,
"utc_datetime": "2026-10-03T10:41:07+00:00"
}Without an address the answer is for the one the request came from, which for a browser or a device is usually where it is:
curl https://aisenseapi.com/services/v1/ip_datetimeThe signature is GET /ip_datetime[/{ip}], with the address as a path segment rather than a query parameter. IPv6 addresses go in as they are written, colons included.
Response fields
| Field | Type | Description |
|---|---|---|
| ip | string | The address looked up: the one in the path, or the caller's. |
| datetime | string | Local date and time, ISO 8601 to the second with the offset. |
| timezone | string | The IANA zone name, such as America/Chicago. |
| abbreviation | string | CDT, CEST, IST, or a numeric one such as -03 where the zone database has no letters. |
| utc_offset | string | The offset in force now, as +HH:MM, summer time included. |
| dst | boolean | Whether summer time is in force. |
| unixtime | integer | Seconds since 1970-01-01 UTC. |
| raw_offset | integer | The standard offset from UTC in seconds, without summer time. |
| dst_offset | integer | Seconds summer time adds now: 3600 almost everywhere, 1800 on Lord Howe Island, 0 outside summer time. The zone database counts Irish winter time and Moroccan Ramadan time as summer time with a negative offset, so it is -3600 there and then. raw_offset + dst_offset is always the offset in force. |
| dst_from | string or null | When the current summer time period began, in UTC. null when dst is false. |
| dst_until | string or null | When it ends, in UTC. null when dst is false. |
| day_of_week | integer | 0 for Sunday to 6 for Saturday, local. |
| day_of_year | integer | Local day of the year, starting at 1. |
| week_number | integer | The ISO 8601 week. |
| utc_datetime | string | The same moment in UTC, ending in +00:00. |
Everything after ip is what /datetime/{zone} answers for the same zone, key for key. Slashes in zone names are not escaped.
Where the zone comes from
The zone comes from an address lookup. Each server worker keeps the result in memory, keyed by the address, and reuses it for up to an hour, or ten minutes when no zone was found, so a device that asks every minute costs one lookup an hour. Zone rules come from the IANA time zone database bundled with the server.
A zone from an address is a good guess, not a fact about the device. A phone on mobile data, a laptop on a VPN or a server behind a proxy is placed where its network meets the internet. A device that knows its zone does better to keep the timezone from its first answer and ask /datetime/{zone} from then on, which needs no lookup at all.
Errors
| Case | Status | Body |
|---|---|---|
| Not an IPv4 or IPv6 address | 400 | {"error":"Invalid IP address.","fix":"..."} |
| No zone known for the address, such as a private or reserved one | 404 | {"error":"No time zone is known for this address.","fix":"..."} |
| Over 5000 calls from one address in a day | 429 | With Retry-After until midnight Oslo time |
The 404 is an answer, not a guess dressed as one: the fix points at asking by zone name instead.
Common uses
First boot
A device or an agent that does not know its zone yet asks once, keeps the zone name it gets back, and reads the clock by name from then on.
Local time for a request
Show the local time where a webhook or a support request came from, beside the UTC stamp in the log.
The next clock change
dst_until says when the clock changes next, so a scheduler can plan around the hour that repeats in autumn or disappears in spring.
Privacy and limits
The address in /ip_datetime/{ip}, or yours when you leave it out, is held in the memory cache and can also appear in request logs with the URL path. See our privacy policy for log retention. IP-based time zones are approximate and may differ from the device's location.
The base URL is https://aisenseapi.com/services/v1. There is no key, no account and no sign-up step. The service-wide limit is 5000 requests per IP per day. Sibling clock endpoints share that budget and are grouped on the Time APIs hub.