Skip to main content

Time Synchronization

ntp/state

The state of network time synchronization.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/ntp/state
{ "synced": true, "time": 28578987 }
NameDescription
synced
bool

Indicates whether the device was able to synchronize its time via NTP.

time
int

A Unix timestamp in minutes indicating the device's current time, or 0 if no time synchronization exists




ntp/config

The configuration of network time synchronization.

Example
# $HOST e.g. warp-AbCd

Read

curl http://$HOST/ntp/config
{
"enable": true,
"use_dhcp": true,
"timezone": "Europe/Berlin",
"server": "time.cloudflare.com",
"server2": "ptbtime3.ptb.de"
}

Write

curl http://$HOST/ntp/config -d '{
"enable": true,
"use_dhcp": true,
"timezone": "Europe/Berlin",
"server": "time.cloudflare.com",
"server2": "ptbtime3.ptb.de"
}'
NameDescription
enable
bool

Specifies whether the device should synchronize its time via NTP. The obtained time is used to determine the start times of tracked charging sessions and in the event log.

use_dhcp
bool

Specifies whether the device should receive NTP servers via DHCP. Only works if DHCP is used for IP address assignment.

timezone
string

The timezone in which the device is located. e.g. "Europe/Berlin"

server
string

IP address or hostname of the time server to use

server2
string

IP address or hostname of the alternative time server to use