createTimezone
Requires at least one of the permissions settings:regional:create or settings:tenant:update.
Adds a timezone with its code, name and UTC offset. The code must not already be used in the organization. A timezone flagged as default takes over from the current default. Requires permission to create regional settings or update tenant settings.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation CreateTimezone($createTimezoneInput: CreateTimezoneInput!) {
createTimezone(createTimezoneInput: $createTimezoneInput) {
id
code
name
createdAt
abbreviation
deletedAt
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation CreateTimezone($createTimezoneInput: CreateTimezoneInput!) {\n createTimezone(createTimezoneInput: $createTimezoneInput) {\n id\n code\n name\n createdAt\n abbreviation\n deletedAt\n }\n}",
"variables": {
"createTimezoneInput": {
"code": "string",
"dstSupported": true,
"isActive": true,
"isDefault": true,
"name": "string",
"offset": "string",
"sortOrder": 0
}
}
}
EOF
Variables:
{
"createTimezoneInput": {
"code": "string",
"dstSupported": true,
"isActive": true,
"isDefault": true,
"name": "string",
"offset": "string",
"sortOrder": 0
}
}
Response:
{
"data": {
"createTimezone": {
"id": "id",
"code": "string",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"abbreviation": "string",
"deletedAt": "2025-01-15T00:00:00Z"
}
}
}
createTimezone(
createTimezoneInput: CreateTimezoneInput!
): Timezone!
Arguments
createTimezone.createTimezoneInput ● CreateTimezoneInput! non-null input
The timezone's code, name, UTC offset and optional daylight-saving rules, sort order and default flag.
Type
Timezone object
A time zone the organization can use.