Set date and time

1. API Description

This API is used to set the date and time.

Request mode: POST [ip]/api/system/set-date-time

Administrator Rights Logged-in
Yes Yes

2. Input Parameters

Name Required Type Description
ntp-enable Yes Boolean Whether to enable NTP
true: Yes; false: No
ntp-server1 Yes String The NTP server 1
ntp-server2 Yes String The NTP server 2
time No String The system time, required when ntp-enable = false.
Time format: yyyy-MM-dd HH:mm:ss,

3. Output Parameters

Name Type Description
status Int Status code
code String Status description

4. Example

Setting the date and time manually.

Input Example
{
  "ntp-enable": false,
  "ntp-server1": "0.pool.ntp.org",
  "ntp-server2": "1.pool.ntp.org",
  "time": "2024-04-11 09:50:18"
}
Output Example
{
    "status": 0,
    "code": "Success"
}

5. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Status Definition Description
7 MW_STATUS_INVALID_ARG The parameters are missing or incorrect

results matching ""

    No results matching ""

    results matching ""

      No results matching ""