Manage Time Zones

Overview

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:

time zone hierarchy

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.

Create and Change Time Zone Settings

To create or change time zones for organizations, workspaces, or users, use the following API calls:

Organization
Workspace
User
curl https://example.gooddata.com/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"
      }
    },
    "id": "timezone",
    "type": "organizationSetting"
  }
}'
curl https://example.gooddata.com/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"
      }
    },
    "id": "timezone",
    "type": "workspaceSetting"
  }
}'
curl https://example.gooddata.com/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"
      }
    },
    "id": "timezone",
    "type": "userSetting"
  }
}'

Verify Time Zone Settings

To verify your time zone settings anytime, use the following API calls:

Organization
Workspace
User
curl https://example.gooddata.com/api/v1/entities/organizationSettings/timezone \
-H "Authorization: Bearer ${API_TOKEN}" \
-X GET
curl https://example.gooddata.com/api/v1/entities/workspaces/${WORKSPACE_ID}/workspaceSettings/timezone \
-H "Authorization: Bearer ${API_TOKEN}" \
-X GET
curl https://example.gooddata.com/api/v1/entities/users/${USER_ID}/userSettings/timezone \
-H "Authorization: Bearer ${API_TOKEN}" \
-X GET

Delete Time Zone Settings

To delete time zone settings, use the following API calls:

Organization
Workspace
User
curl https://example.gooddata.com/api/v1/entities/organizationSettings/timezone \
-H "Authorization: Bearer ${API_TOKEN}" \
-X DELETE
curl https://example.gooddata.com/api/v1/entities/workspaces/${WORKSPACE_ID}/workspaceSettings/timezone \
-H "Authorization: Bearer ${API_TOKEN}" \
-X DELETE
curl https://example.gooddata.com/api/v1/entities/users/${USER_ID}/userSettings/timezone \
-H "Authorization: Bearer ${API_TOKEN}" \
-X DELETE