Skip to main content
Skip table of contents

TimeController

Last updated: 2025/3/7 11:53:35

Path To

Name

Description/Function

/api/time

/ntp/enable

Enable auto time.

/api/time

/ntp/disable

Enable manual time.

/api/time

/ntp/drift

Gets the current NTP drift in ms.

/api/time

/ntp/driftthreshold

Gets the NTP drift threshold in ms.

/api/time

/ntp/server

Get the current NTP server address.

/api/time

/datetime

Get the current date and time on the camera as a unix timestamp.

/api/time

/year

Get the current year.

/api/time

/month

Get the current month.

/api/time

/day

Get the current day.

/api/time

/hour

Get the current hour.

/api/time

/minute

Get the current minute.

/api/time

/second

Get the current second.

/api/time

/now

Get the current date and time on the camera as a DateTime.

/api/time

/timezone

Set the current time zone on the camera.

/api/time

/ntp/isenabled

Query for clock mode is auto.

/api/time

/ntp/sync

Synchronizes the camera with the configured NTP server.

/api/time

/ntp/driftthreshold/{value}

Sets the NTP drift threshold in ms.

/api/time

/ntp/server/{server}

Set the NTP server address.

/api/time

/datetime/{millis}

Set the current date and time on the camera.

/api/time

/timezone

Set the current time zone on the camera.

/ntp/enable

Function

Enable auto time.

Method

Get

Response

Status code 200, for an completed operation being preformed.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/enable

/ntp/disable

Function

Enable manual time.

Method

Get

Response

Status code 200, for an completed operation being preformed.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/disable

/ntp/drift

Function

Gets the current NTP drift in ms.

Method

Get

Response

The ntp server address.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/drift

/ntp/driftthreshold

Function

Gets the NTP drift threshold in ms.

Method

Get

Response

The ntp server address.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/driftthreshold

/ntp/server

Function

Get the current NTP server address.

Method

Get

Response

The ntp server address.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/server

/datetime

Function

Get the current date and time on the camera as a unix timestamp.

Method

Get

Response

The current date and time on the camera in milliseconds since the unix epoch.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/datetime

/year

Function

Get the current year.

Method

Get

Response

The current year.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/year

/month

Function

Get the current month.

Method

Get

Response

The current month.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/month

/day

Function

Get the current day.

Method

Get

Response

The current day.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/day

/hour

Function

Get the current hour.

Method

Get

Response

The current hour.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/hour

/minute

Function

Get the current minute.

Method

Get

Response

The current minute.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/minute

/second

Function

Get the current second.

Method

Get

Response

The current second.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/second

/now

Function

Get the current date and time on the camera as a DateTime.

Method

Get

Response

The current date and time on the camera.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/now

/timezone

Function

Set the current time zone on the camera.

Method

Get

Response

The time zone.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/timezone

/ntp/isenabled

Function

Query for clock mode is auto.

Method

Get

Response

True if the camera is in auto time mode.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/isenabled

/ntp/sync

Function

Synchronizes the camera with the configured NTP server.

Method

Get

Response

Status code 200, for an completed operation being preformed.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/sync

/ntp/driftthreshold/{value}

Function

Sets the NTP drift threshold in ms.

Method

Get

Response

A drift threshold in ms.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/driftthreshold/{value}

/ntp/server/{server}

Function

Set the NTP server address.

Method

Get

Response

Server address.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/ntp/server/{server}

/datetime/{millis}

Function

Set the current date and time on the camera.

Method

Get

Response

A datetime to set.

Example

CODE
$ curl http://IP_ADDRESS:8080>/api/time/datetime/{millis}

/timezone

Function

Set the current time zone on the camera.

Method

Post

Body

CODE
{ "TimeZone":"{Time Zone Olson ID}" }

https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

Response

A representing the asynchronous operation.

Explanation

See the table below for a list of all possible timezone values.

Example

Example 1

CODE
{ "TimeZone":"America/St_Johns" }

Output

CODE
$ curl -X POST http://<ip>:<port>/api/time/timezone 
   -H 'Content-Type: application/json'
   -d '{ "TimeZone":"America/St_Johns" }'
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.