Time Zone Management
  • 06 Jan 2023
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Time Zone Management

  • Dark
    Light

👤 This documentation is intended for Limited Contributors, Primary Contributors, and Workspace Admins. Check with your Team Admin for additional access.

Overview

Time zones can be tricky because you need to take into consideration both the timezone stored with your time data and the end user's local time zone. Typically, the database time zone is UTC by default.

Changing the time zone for the dataset

Within the dataset settings, you can specify an hours offset if you know your audience using the dataset will in the same timezone.

After opening dataset using the pencil icon, you can navigate to the "Settings" tab:

image.png

Once the "Hours Offset" is updated, all time columns used in charts will adopt the offset.

Filtering using time range filter

Filter values set using the time range filter will adopt the time zone specified by the original database. For example, if a date or date range is used for filter options, then the start and end ranges will remain static:

image.png

The SQL statement applies no time zone shifts in the WHERE clause, so the time zone follows what is set in the dataset, and charts using this filter statement will continue to adopt the time zone in the dataset.
image.png

If using the advanced filter and relative values, such as now, noon, tomorrow, etc., then these values will be set in the UTC timezone:
image.png

Creating offsets in the time range filter

The time range filter supports offsets in SQL-like format, using the date functions such as lastday, datetime, and dateadd. Keep in mind that the default result is in UTC time.

Here is an example to try:
image.png

The above would return a date range between 3 days before the end of the week to the end of the week.

To filter the value of your dashboard through a timezone offset, you can specify a number of hours, such as now,-5 hours

image.png

The above would return a time range between 5 hours before current time and 5 hours after current time.


Was this article helpful?

What's Next