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.

Organizations

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

API (Bash)
API (Powershell)
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"
      }
    },
    "id": "timezone",
    "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"
        }
      },
      "id": "timezone",
      "type": "organizationSetting"
    }
}' | ConvertTo-Json

Workspaces

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

API (Bash)
API (Powershell)
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"
      }
    },
    "id": "timezone",
    "type": "workspaceSetting"
  }
}'| jq .
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"
        }
      },
      "id": "timezone",
      "type": "workspaceSetting"
    }
}' | ConvertTo-Json

Users

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

API (Bash)
API (Powershell)
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"
      }
    },
    "id": "timezone",
    "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"
        }
      },
      "id": "timezone",
      "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

API (Bash)
API (Powershell)
curl $HOST_URL/api/v1/entities/organizationSettings/timezone \
-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"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

Workspaces

API (Bash)
API (Powershell)
curl $HOST_URL/api/v1/entities/workspaces/$WORKSPACE_ID/workspaceSettings/timezone \
-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"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

Users

API (Bash)
API (Powershell)
curl $HOST_URL/api/v1/entities/users/$USER_ID/userSettings/timezone \
-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"`
-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

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

Workspaces

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

Users

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