Skip to main content

Time zones

Supported time zones

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

Supported time zones 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/Astana
  • Asia/Ashkhabad
  • Asia/Bahrain
  • Asia/Bangkok
  • Asia/Chongqing
  • Asia/Colombo
  • Asia/Dhaka
  • Asia/Dubai
  • Asia/Ho_Chi_Minh
  • Asia/Hong_Kong
  • Asia/Jakarta
  • Asia/Jerusalem
  • Asia/Karachi
  • Asia/Kathmandu
  • Asia/Kolkata
  • Asia/Kuala_Lumpur
  • 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/Azores
  • 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/Prague
  • Europe/Riga
  • Europe/Rome
  • Europe/Stockholm
  • Europe/Tallinn
  • Europe/Vienna
  • Europe/Vilnius
  • Europe/Warsaw
  • Europe/Zurich
  • Pacific/Auckland
  • Pacific/Chatham
  • Pacific/Fakaofo
  • Pacific/Honolulu
  • Pacific/Norfolk
  • US/Mountain

If your time zone is not supported, you can request it on GitHub Issues 🔐 (access is restricted) or add your custom time zone.

Adding custom time zones

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

Custom time zones are required to be either mapped (aliased) to a supported time zone (see list above) or to a GMT based time zone.

danger

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

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

GMT based time zones

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

The format of the GMT based time zone 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 time zone which will be aliased to the existing time zone of Johannesburg.
  • add Nuuk as a custom time zone which will be aliased to a GMT based time zone.
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',
},
],
}));