Datetime by zone or UTC offset
Without an argument, /datetime returns the current datetime in UTC. Add an IANA zone such as europe/oslo, in any case, which follows summer time, or a four-digit offset for a fixed shift.
curl https://aisenseapi.com/services/v1/datetime/europe/oslo
{"datetime":"2026-10-03T12:41:07+02:00","timezone":"Europe/Oslo","abbreviation":"CEST","utc_offset":"+02:00","dst":true,"unixtime":1791024067,"raw_offset":3600,"dst_offset":3600,"dst_from":"2026-03-29T01:00:00+00:00","dst_until":"2026-10-25T01:00:00+00:00","day_of_week":6,"day_of_year":276,"week_number":40,"utc_datetime":"2026-10-03T10:41:07+00:00"}curl https://aisenseapi.com/services/v1/datetime/+0200
{ "datetime": "2026-08-16T11:44:35+02:00" }An offset is four digits with an optional sign, or the same with a colon. Valid examples are +0200, -0530, 0100 and +02:00. An hour-only value such as 1 does not match the route. An unknown zone name is HTTP 400 with a fix.
Datetime where an address is
/ip_datetime answers the same fields as /datetime/{zone} for the zone an IPv4 or IPv6 address is in, with the address first. Without an address it uses the caller's own.
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, ...}The zone comes from an address lookup and is approximate. A device that knows its zone does better to ask by name. More on the IP datetime page.
Moving from WorldTimeAPI
On 3 October 2026 every connection we made to worldtimeapi.org was reset. Its fields answer here under this API's own paths: /api/timezone/{zone} is /datetime/{zone}, /api/ip is /ip_datetime, and /api/timezone is /timezones. Only HTTPS is served, and every answer is JSON. The WorldTimeAPI alternative page has the translation table, what differs and the ESP32 change.
Unix timestamp and microtimestamp
Timestamp
GET/timestamp
{ "timestamp": 1786873261 }Whole seconds since the Unix epoch.
Microtimestamp
GET/microtimestamp
{ "microtimestamp": 1786873474.745043 }Unix time with fractional seconds.
Timezone list and offset filter
/timezones returns IANA timezone names and their current offsets. Add a four-digit offset to filter the list.
curl https://aisenseapi.com/services/v1/timezones/+0200
{
"timezones": [
{ "timezone": "Africa/Blantyre", "offset": "+0200" },
{ "timezone": "Europe/Oslo", "offset": "+0200" }
]
}The timezones value is an array of objects. It is not an array of strings. Offsets can change with daylight-saving rules, so read the returned value instead of storing a permanent assumption.
Swatch Internet Time
This endpoint divides the day into 1000 beats based on Biel Mean Time.
curl https://aisenseapi.com/services/v1/swatchinternettime
{ "beat": "@444", "date": "2026-08-16" }beat is a string that begins with @.
Convert between time formats
POST /timestamp_convert takes one value - unix seconds, unix milliseconds (13 digits and up, detected automatically), ISO 8601, RFC 2822 or "now" - and returns every representation, with an optional four-digit offset for the datetime output. Bad input returns HTTP 400.
curl -X POST https://aisenseapi.com/services/v1/timestamp_convert
-H "Content-Type: application/json" -d '{"data": "1700000000123", "offset": "+0100"}'
{ "detected": "unix_ms", "timestamp": 1700000000,
"datetime": "2023-11-14T23:13:20+01:00", "utc_datetime": "2023-11-14T22:13:20+00:00" }Common uses
Workflow timestamps
Add a shared server-side timestamp to an automation result.
Timezone selection
Build a list of zones that currently share a given UTC offset.
Scheduling input
Convert a user-selected offset into an ISO 8601 value.
Testing
Fetch a current value when test code needs time from an external source.
Response and error handling
The response key matches the endpoint name. Errors return {"error": "..."} with a real HTTP status - 400 for bad input, 404 for unknown paths and ids. The service-wide limit is 5000 requests per IP per day.