5.1.5 api system time

The /api/system/time function is used for device time retrieval.

GET or POST method can be used for the function.

The function is part of the System service and the user has to be assigned the System (Monitoring) privilege for authentication if required.

Parameter

Description

utcTime

number = unix time, min 0, max 2147483647 

source

time source ["rtp","ntp","my2n","vms","browser","gui","api"]

automatic

automatic time retrieval from NTP server

The response is in the application/json format and includes the device real time in seconds from 00:00 1.1.1970 (unix time). 

Example:

{
  "success" : true,
  "result" : {
    "utcTime" : 1639472172,
    "source" : "My2N",
    "automatic" : true,
  }
}

Caution

  • We recommend that this endpoint is used for time setting only in case the Use time from Internet parameter is disabled. If it is enabled, the time value is overwritten with a value from the NTP server or the My2N time service.