Skip to main content
Version: v25

Timezones

Supported Timezones

We expect to get the name of the time zone in olsondb format. Timezone should be defined within the timezone property for Symbol information.

Supported timezones are:

  • Etc/UTC
  • Africa/Cairo
  • Africa/Casablanca
  • Africa/Johannesburg
  • Africa/Lagos
  • America/Anchorage
  • America/Argentina/Buenos_Aires
  • America/Bogota
  • America/Caracas
  • America/Chicago
  • America/El_Salvador
  • America/Juneau
  • America/Lima
  • America/Los_Angeles
  • America/Mexico_City
  • America/New_York
  • America/Phoenix
  • America/Santiago
  • America/Sao_Paulo
  • America/Toronto
  • America/Vancouver
  • Asia/Almaty
  • Asia/Ashkhabad
  • Asia/Bahrain
  • Asia/Bangkok
  • Asia/Chongqing
  • Asia/Colombo
  • Asia/Dubai
  • Asia/Ho_Chi_Minh
  • Asia/Hong_Kong
  • Asia/Jakarta
  • Asia/Jerusalem
  • Asia/Karachi
  • Asia/Kathmandu
  • Asia/Kolkata
  • Asia/Kuwait
  • Asia/Manila
  • Asia/Muscat
  • Asia/Nicosia
  • Asia/Qatar
  • Asia/Riyadh
  • Asia/Yangon
  • Asia/Seoul
  • Asia/Shanghai
  • Asia/Singapore
  • Asia/Taipei
  • Asia/Tehran
  • Asia/Tokyo
  • Atlantic/Reykjavik
  • Australia/Adelaide
  • Australia/Brisbane
  • Australia/Perth
  • Australia/Sydney
  • Europe/Athens
  • Europe/Belgrade
  • Europe/Berlin
  • Europe/Bratislava
  • Europe/Brussels
  • Europe/Bucharest
  • Europe/Budapest
  • Europe/Copenhagen
  • Europe/Helsinki
  • Europe/Istanbul
  • Europe/London
  • Europe/Luxembourg
  • Europe/Madrid
  • Europe/Moscow
  • Europe/Oslo
  • Europe/Paris
  • Europe/Riga
  • Europe/Rome
  • Europe/Stockholm
  • Europe/Tallinn
  • Europe/Vilnius
  • Europe/Warsaw
  • Europe/Zurich
  • Pacific/Auckland
  • Pacific/Chatham
  • Pacific/Fakaofo
  • Pacific/Honolulu
  • Pacific/Norfolk
  • US/Mountain

Adding Custom Timezones

Additional custom timezones can be specified for use within the library. These timezones can be selected from the timezone menu, chart settings, and can be used by symbols for their timezone.

Custom timezones are required to be either mapped (aliased) to a supported timezone (see list above) or to a GMT based timezone.

danger

You should ensure that the alias timezone correctly matches your desired timezone in all aspects (including daylight saving time dates).

Custom timezones are specified within the widget constructor options with the custom_timezones property.

GMT based timezones

In addition to the default supported timezones, you can also alias your custom timezone to GMT based timezone. These timezones can only be used for the alias property of a custom timezone.

The format of the GMT based timezone ids is as follows:

  • Starts with Etc/GMT
  • followed by either a - or + sign
  • the number of hours offset
  • and (optionally) the minutes after a colon.

Examples:

  • Etc/GMT+0 : same as Etc/UTC
  • Etc/GMT+2 : 2 hours behind GMT
  • Etc/GMT-4 : 4 hours ahead of GMT
  • Etc/GMT-3:21 : 3 hours and 21 minutes ahead of GMT

Note: In order to conform with the POSIX style, the zone names have their sign reversed from the standard ISO 8601 convention. In the "Etc/" area, zones west of GMT have a positive sign and those east have a negative sign in their name (e.g "Etc/GMT-14" is 14 hours ahead of GMT).

Example

As an example, we are going to:

  • add Cape Town as a custom timezone which will be aliased to the existing timezone of Johannesburg.
  • add Nuuk as a custom timezone which will be aliased to a GMT based timezone.
var widget new TradingView.widget({
/* ... Other constructor options */

custom_timezones: [
{
id: 'Africa/Cape_Town',
alias: 'Africa/Johannesburg',
title: 'Cape Town',
},
{
id: 'America/Nuuk',
alias: 'Etc/GMT+3',
title: 'Nuuk',
},
],
}));