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
|
/ntp/disable
Function | Enable manual time. |
---|---|
Method | Get |
Response | Status code 200, for an completed operation being preformed. |
Example |
CODE
|
/ntp/drift
Function | Gets the current NTP drift in ms. |
---|---|
Method | Get |
Response | The ntp server address. |
Example |
CODE
|
/ntp/driftthreshold
Function | Gets the NTP drift threshold in ms. |
---|---|
Method | Get |
Response | The ntp server address. |
Example |
CODE
|
/ntp/server
Function | Get the current NTP server address. |
---|---|
Method | Get |
Response | The ntp server address. |
Example |
CODE
|
/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
|
/year
Function | Get the current year. |
---|---|
Method | Get |
Response | The current year. |
Example |
CODE
|
/month
Function | Get the current month. |
---|---|
Method | Get |
Response | The current month. |
Example |
CODE
|
/day
Function | Get the current day. |
---|---|
Method | Get |
Response | The current day. |
Example |
CODE
|
/hour
Function | Get the current hour. |
---|---|
Method | Get |
Response | The current hour. |
Example |
CODE
|
/minute
Function | Get the current minute. |
---|---|
Method | Get |
Response | The current minute. |
Example |
CODE
|
/second
Function | Get the current second. |
---|---|
Method | Get |
Response | The current second. |
Example |
CODE
|
/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
|
/timezone
Function | Set the current time zone on the camera. |
---|---|
Method | Get |
Response | The time zone. |
Example |
CODE
|
/ntp/isenabled
Function | Query for clock mode is auto. |
---|---|
Method | Get |
Response | True if the camera is in auto time mode. |
Example |
CODE
|
/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
|
/ntp/driftthreshold/{value}
Function | Sets the NTP drift threshold in ms. |
---|---|
Method | Get |
Response | A drift threshold in ms. |
Example |
CODE
|
/ntp/server/{server}
Function | Set the NTP server address. |
---|---|
Method | Get |
Response | Server address. |
Example |
CODE
|
/datetime/{millis}
Function | Set the current date and time on the camera. |
---|---|
Method | Get |
Response | A datetime to set. |
Example |
CODE
|
/timezone
Function | Set the current time zone on the camera. |
---|---|
Method | Post |
Body |
CODE
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
Output
CODE
|