Using the time integration
The time command returns the current time to your device. It is a built-in
service, so no account linking is required.
Send the time query from your device over the websocket and read the
time.response command that the server sends back.
Contexts
Clock
Get the current time
Returns the current time formatted for the zone resolved from the request. When no parameters are supplied the server uses the zone derived from the request (device IP if resolvable, otherwise UTC).
{
"time" : { }
}
{
"time.response" : {
"offset" : "Z",
"timezone" : "Z",
"epoch" : 1788186600,
"time" : "2026-08-31T14:30:00"
},
"endpointId" : "test-endpoint-id"
}
Get the current time in an explicit timezone
Returns the current time in the supplied IANA timezone. The timezone parameter
always wins over country and IP-based resolution.
{
"time" : {
"timezone" : "Europe/Berlin"
}
}
{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "2026-08-31T16:30:00"
},
"endpointId" : "test-endpoint-id"
}
Get the current time for a country
Returns the current time in the default timezone for the supplied ISO-3166 alpha-2 country code.
{
"time" : {
"country" : "DE"
}
}
{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "2026-08-31T16:30:00"
},
"endpointId" : "test-endpoint-id"
}
If the country code is unknown, the server falls back to UTC.
{
"time" : {
"country" : "QQ"
}
}
{
"time.response" : {
"offset" : "Z",
"timezone" : "Z",
"epoch" : 1788186600,
"time" : "2026-08-31T14:30:00"
},
"endpointId" : "test-endpoint-id"
}
Get the current time from the device IP
When no timezone or country is supplied, the server resolves the country
from the device IP address and uses that country’s default timezone. When the IP
cannot be resolved, the server falls back to UTC.
{
"time" : { }
}
{
"time.response" : {
"offset" : "+03:00",
"timezone" : "Europe/Athens",
"epoch" : 1788186600,
"time" : "2026-08-31T17:30:00"
},
"endpointId" : "test-endpoint-id"
}
Format presets and patterns
The format parameter accepts a simple preset name or a raw Java
DateTimeFormatter pattern. Presets:
-
iso- ISO-8601 local date-time (default), e.g.2026-08-31T14:30:00 -
date-yyyy-MM-dd, e.g.2026-08-31 -
time-HH:mm:ss, e.g.14:30:00 -
datetime-yyyy-MM-dd HH:mm:ss, e.g.2026-08-31 14:30:00 -
rfc1123- RFC-1123, e.g.Mon, 31 Aug 2026 16:30:00 +0200
An invalid pattern or preset is ignored and no response is sent.
date preset{
"time" : {
"country" : "DE",
"format" : "date"
}
}
date preset{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "2026-08-31"
},
"endpointId" : "test-endpoint-id"
}
time preset{
"time" : {
"timezone" : "Europe/Berlin",
"format" : "time"
}
}
time preset{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "16:30:00"
},
"endpointId" : "test-endpoint-id"
}
datetime preset{
"time" : {
"timezone" : "Europe/Berlin",
"format" : "datetime"
}
}
datetime preset{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "2026-08-31 16:30:00"
},
"endpointId" : "test-endpoint-id"
}
iso preset{
"time" : {
"timezone" : "Europe/Berlin",
"format" : "iso"
}
}
iso preset{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "2026-08-31T16:30:00"
},
"endpointId" : "test-endpoint-id"
}
rfc1123 preset{
"time" : {
"timezone" : "Europe/Berlin",
"format" : "rfc1123"
}
}
rfc1123 preset{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "Mon, 31 Aug 2026 16:30:00 +0200"
},
"endpointId" : "test-endpoint-id"
}
{
"time" : {
"format" : "HH:mm"
}
}
{
"time.response" : {
"offset" : "Z",
"timezone" : "Z",
"epoch" : 1788186600,
"time" : "14:30"
},
"endpointId" : "test-endpoint-id"
}
Localized output
The locale parameter takes a BCP-47 language tag and is applied when the
format uses locale-sensitive fields such as month or day names.
{
"time" : {
"country" : "DE",
"format" : "EEEE",
"locale" : "de"
}
}
{
"time.response" : {
"offset" : "+02:00",
"timezone" : "Europe/Berlin",
"epoch" : 1788186600,
"time" : "Montag"
},
"endpointId" : "test-endpoint-id"
}
Server-sent notifications
The time integration has no server notifications. The server only responds to a
device time query with a time.response command.