POST /system/servers/{server_id}/system_time_settings
Sets the system time and time zone settings of to a server host. Services are restarted after the call and service interruptions will occur.
Sets the system time and time zone settings of to a server host.
MIME Type |
---|
application/json |
Parameter | Type | Optionality | Data Type | MIME Type | Description |
---|---|---|---|---|---|
server_id |
path |
Required |
Number (Integer) |
text/plain |
Required - The ID of the server |
fields |
header |
Optional |
String |
text/plain |
Optional - Use this parameter to specify which fields you would like to get back in the response. Fields that are not named are excluded. Specify subfields in brackets and multiple fields in the same object are separated by commas. |
Parameter | Data Type | MIME Type | Description | Sample |
---|---|---|---|---|
settings |
Object |
application/json |
Server system time settings that contain the following fields:
|
{ "current_time": 42, "ntp_server_addresses": [ "String" ], "sync_with_ntp_server": true, "timezone_id": "String" } |
HTTP Response Code | Unique Code | Description |
---|---|---|
200 |
The system time settings have been applied. |
|
404 |
1002 |
The requested server with the given server ID cannot be found. |
422 |
1005 |
One or more parameters are invalid in request. |
500 |
1020 |
An error occurred during the attempt to apply the system time settings to the server. |
500 |
1022 |
Timeout during performance of the task. |
Response Description
- timezone_id - String - The current time zone.
- current_time - Long - The current epoch time (number of milliseconds after Epoch).
- is_sync_with_ntp_server - boolean - Is the ntp service used to synchronize the system time with configured NTP time servers?
- ntp_server_addresses - Array - The array of the configured NTP server addresses. Null if is_sync_with_ntp_server is false.
Response Sample
{
"current_time": 42,
"ntp_server_addresses": [
"String"
],
"sync_with_ntp_server": true,
"timezone_id": "String"
}