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/UTCAfrica/CairoAfrica/CasablancaAfrica/JohannesburgAfrica/LagosAmerica/AnchorageAmerica/Argentina/Buenos_AiresAmerica/BogotaAmerica/CaracasAmerica/ChicagoAmerica/El_SalvadorAmerica/JuneauAmerica/LimaAmerica/Los_AngelesAmerica/Mexico_CityAmerica/New_YorkAmerica/PhoenixAmerica/SantiagoAmerica/Sao_PauloAmerica/TorontoAmerica/VancouverAsia/AlmatyAsia/AshkhabadAsia/BahrainAsia/BangkokAsia/ChongqingAsia/ColomboAsia/DhakaAsia/DubaiAsia/Ho_Chi_MinhAsia/Hong_KongAsia/JakartaAsia/JerusalemAsia/KarachiAsia/KathmanduAsia/KolkataAsia/KuwaitAsia/ManilaAsia/MuscatAsia/NicosiaAsia/QatarAsia/RiyadhAsia/YangonAsia/SeoulAsia/ShanghaiAsia/SingaporeAsia/TaipeiAsia/TehranAsia/TokyoAtlantic/ReykjavikAustralia/AdelaideAustralia/BrisbaneAustralia/PerthAustralia/SydneyEurope/AthensEurope/BelgradeEurope/BerlinEurope/BratislavaEurope/BrusselsEurope/BucharestEurope/BudapestEurope/CopenhagenEurope/HelsinkiEurope/IstanbulEurope/LondonEurope/LuxembourgEurope/MadridEurope/MoscowEurope/OsloEurope/ParisEurope/RigaEurope/RomeEurope/StockholmEurope/TallinnEurope/VilniusEurope/WarsawEurope/ZurichPacific/AucklandPacific/ChathamPacific/FakaofoPacific/HonoluluPacific/NorfolkUS/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.
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 asEtc/UTCEtc/GMT+2: 2 hours behind GMTEtc/GMT-4: 4 hours ahead of GMTEtc/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',
    },
 ],
}));