Manage Time Zones

By default, GoodData displays your data in your organization in the time zone of the server.

This means, that if you filter your data to This day, GoodData displays the same data for all workspaces and users, even if they are located in a different time zone.

To enable users to display the data in their local time zones, you can configure a specific time zone for your organization, workspace, or even for individual users. GoodData then converts the data to the time zone that the user has configured.

Time Zone Hierarchy

You can configure a specific time zone for individual users, workspaces, and organizations.

If you do not specify a time zone:

  • Users inherit the time zone settings from their workspaces,
  • Workspaces inherit the settings from their parent entity, i.e. parent workspace or organization.

The following image shows the settings in an example hierarchy:

Diagram showing the inheritance hierarchy of time zone settings in GoodData. An organization has Europe/Prague as its time zone entity setting. Two workspaces below inherit this setting: the left one retains Europe/Prague, while the right one overrides it with an entity setting and changes to America/Los_Angeles. Below the right workspace, two child workspaces are shown: one inherits America/Los_Angeles and the other overrides it with an entity setting and reverts to Europe/Prague.

Database Data Types

If your data is stored in the DATE or TIMESTAMP data types, no time conversion is available.

We recommend configuring the time zone for the organization or workspace, so that you always see relevant data.

If the data in your database has a time zone specified in the TIMESTAMPTZ data type, the data converts to the time zone of individual users based on their settings.

Configure Time Zones

You can configure time zones via API for organizations, workspaces, and users.

The following sections contain examples of various API calls for domain example.gooddata.com.

Organizations

To create or change time zones for organizations, use the following API call:

curl $HOST_URL/api/v1/entities/organizationSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X POST \
-d '{
  "data": {
    "attributes": {
      "content": {
        "value": "America/Los_Angeles"
      },
      "type": "TIMEZONE"
    },
    "id": "timezone-us-la",
    "type": "organizationSetting"
  }
}' | jq .
Invoke-RestMethod -Method Post -Uri "$HOST_URL/api/v1/entities/organizationSettings"`
-ContentType "application/vnd.gooddata.api+json" `
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} `
-Body '{
    "data": {
      "attributes": {
        "content": {
          "value": "America/Los_Angeles"
        },
        "type": "TIMEZONE"
      },
      "id": "timezone-us-la",
      "type": "organizationSetting"
    }
}' | ConvertTo-Json

Workspaces

To create or change time zones for individual workspaces:

Go to the Workspaces tab and open the workspace you want to edit. Open the Settings tab and click Change in the Time zone section.

Localization section in the Settings tab displaying four configuration rows: display language, date format, first day of the week, and time zone. Each setting includes a Change button on the right side of its row.

Create a Time Zone:

To create a time zone setting, use a POST request.

curl $HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X POST \
-d '{
  "data": {
    "attributes": {
      "content": {
        "value": "America/Los_Angeles"
      },
      "type": "TIMEZONE"
    },
    "id": "timezone-us-la",
    "type": "workspaceSetting"
  }
}'| jq .

Change a Time Zone:

To change or update an existing time zone setting, use a PUT request to the following endpoint. This allows you to modify the setting for a specific workspace.

curl $HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings/$TIMEZONE_ID \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X PUT \
-d '{
  "data": {
    "attributes": {
      "content": {
        "value": "America/Los_Angeles"
      },
      "type": "TIMEZONE"
    },
    "id": "timezone-us-la",
    "type": "workspaceSetting"
  }
}' | jq .

$TIMEZONE_ID is the ID of the timezone object (timezone-us-la in this case).

Invoke-RestMethod -Method Post -Uri "$HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings"`
-ContentType "application/vnd.gooddata.api+json" `
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} `
-Body '{
    "data": {
      "attributes": {
        "content": {
          "value": "America/Los_Angeles"
        },
        "type": "TIMEZONE"
      },
      "id": "timezone-us-la",
      "type": "workspaceSetting"
    }
}' | ConvertTo-Json

Users

To create or change time zones for individual users, use the following API call:

curl $HOST_URL/api/v1/entities/users/$USER_ID/userSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X POST \
-d '{
  "data": {
    "attributes": {
      "content": {
        "value": "America/Los_Angeles"
      },
      "type": "TIMEZONE"
    },
    "id": "timezone-us-la",
    "type": "userSetting"
  }
}'|jq .
Invoke-RestMethod -Method Post -Uri "$HOST_URL/api/v1/entities/users/$USER_ID/userSettings"`
-ContentType "application/vnd.gooddata.api+json" `
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} `
-Body '{
    "data": {
      "attributes": {
        "content": {
          "value": "America/Los_Angeles"
        },
        "type": "TIMEZONE"
      },
      "id": "timezone-us-la",
      "type": "userSetting"
    }
}' | ConvertTo-Json

Verify Time Zone Settings

You can verify your time zone settings anytime by using the API calls provided in below.

Organizations

curl $HOST_URL/api/v1/entities/organizationSettings/$TIMEZONE_ID \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X GET|jq .
Invoke-RestMethod -Method Get -Uri "$HOST_URL/api/v1/entities/organizationSettings/$TIMEZONE_ID"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

Workspaces

curl $HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings/$TIMEZONE_ID \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X GET \
|jq .
Invoke-RestMethod -Method Get -Uri "$HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings/$TIMEZONE_ID"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

Users

curl $HOST_URL/api/v1/entities/users/$USER_ID/userSettings/$TIMEZONE_ID \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X GET \
|jq .
Invoke-RestMethod -Method Get -Uri "$HOST_URL/api/v1/entities/users/$USER_ID/userSettings/$TIMEZONE_ID"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

Delete Time Zone Settings

You can delete the time zone from your organization, workspace, or user settings by using the API calls provided below.

Organizations

curl $HOST_URL/api/v1/entities/organizationSettings/$TIMEZONE_ID \
-H "Authorization: Bearer $API_TOKEN" \
-X DELETE
Invoke-RestMethod -Method Delete -Uri "$HOST_URL/api/v1/entities/organizationSettings/$TIMEZONE_ID"`
-H @{ 
    'Authorization' = "Bearer $API_TOKEN" 
} 

Workspaces

curl $HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings/$TIMEZONE_ID \
-H "Authorization: Bearer $API_TOKEN" \
-X DELETE
Invoke-RestMethod -Method Delete -Uri "$HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings/$TIMEZONE_ID"`
-H @{ 
    'Authorization' = "Bearer $API_TOKEN" 
}

Users

curl $HOST_URL/api/v1/entities/users/$USER_ID/userSettings/$TIMEZONE_ID \
-H "Authorization: Bearer $API_TOKEN" \
-X DELETE
Invoke-RestMethod -Method Delete -Uri "$HOST_URL/api/v1/entities/users/$USER_ID/userSettings/$TIMEZONE_ID"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
}