> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Understanding timezone conversion & connection settings

> Learn how connection settings impact timezone conversion in your data, how to determine the converting timezone, and how to prevent conversion.

Omni can convert time-based data to different timezones, performing the conversion when it generates SQL for a query. The underlying data is not changed. Omni converts the query results using the connection's timezone settings.

## Defining connection timezone settings

Connections have a few settings that allow you to specify how time-based data is converted:

<ParamField path="Database timezone" default="UTC">
  Defines the timezone the database is in. The specified timezone is used as the source timezone for any timezone conversions.
</ParamField>

<ParamField path="Query timezone" default="Do not convert">
  Defines the timezone to convert data to when querying.

  * **If Do Not Convert is selected**, the **Query Timezone** will be UTC and no conversion will occur.
  * **If a timezone is selected**:
    * When querying, data will be converted from the **Database timezone** to the selected timezone
    * In Omni, fields with timezone data will display in the **Query Timezone**. This also applies to filters with references to relative times and dates, such as today, yesterday, and so on.
    * **And the connection is to Snowflake**, if you specify any `timestamp_tz` fields will be displayed in that timezone. Otherwise, they will keep their timezone offset as-is.
</ParamField>

<ParamField path="Allow User-specific Timezones" default="Disabled">
  If enabled, individual users' **Query Timezone** setting will be used as the query timezone for the connection.
</ParamField>

## Determining the converting timezone

Trying to determine how these settings impact the timezone used for conversion? Check out the following diagram to step through how Omni uses these settings.

```mermaid theme={null}
graph TB
  checkUserTz("Is the connection's 
  **User-specific Timezone** setting checked?")
  yesUserTz(Yes)
  noUserTz(No)
  userHasQueryTz("Is the user's 
  **Query Timezone** setting defined?")
  yesUserHasQueryTz(Yes)
  setQueryTz("Is the connection's
  **Query Timezone** setting defined?")
  yesQueryTz(Yes)
  noQueryTz(No)
  dbTzToUserTz("Convert from 
  **Database Timezone** to the user's **Query Timezone**")
  dbTzToQueryTz("Convert from 
  **Database Timezone** to connection's 
  **Query Timezone**")
  noConversion("No conversion occurs; timezone is UTC")

  checkUserTz --> yesUserTz --> userHasQueryTz --> yesUserHasQueryTz --> dbTzToUserTz
  userHasQueryTz --> noUserTz
  checkUserTz --> noUserTz --> setQueryTz --> yesQueryTz --> dbTzToQueryTz
  setQueryTz --> noQueryTz --> noConversion
```

## Preventing timezone conversion

To prevent timezone conversion for a field, add the `convert_tz: false` property to the [field in model](/modeling/dimensions/parameters/convert-tz). **Note**: This applies only to fields that don't contain timezone information.
