Skip to main content

update

Update the system timezone on a target node.

Usage

osapi client node timezone update [flags]

Flags

FlagTypeDefaultDescription
--targetstring_anyTarget hostname, _all, or label selector
--timezonestringIANA timezone name (required)
--jsonboolfalseOutput raw JSON response

Examples

# Set timezone on a specific host
osapi client node timezone update --target web-01 \
--timezone America/New_York

# Set timezone on all hosts
osapi client node timezone update --target _all \
--timezone UTC

# Get raw JSON output
osapi client node timezone update --target web-01 \
--timezone UTC --json

Output

  Job ID: 550e8400-e29b-41d4-a716-446655440000

STATUS CHANGED ERROR
ok true

JSON Output

{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"results": [
{
"hostname": "web-01",
"status": "ok",
"timezone": "America/New_York",
"changed": true
}
]
}