Standard TimeZones class.


Sets the timezone for all the robot or indicator datetime references.


public static sealed class TimeZones : Object


AlaskanStandardTime Field(GMT-09:00) Alaska
ArabianStandardTime Field(GMT+04:00) Abu Dhabi, Muscat
ArabicStandardTime Field(GMT+03:00) Baghdad
ArabStandardTime Field(GMT+03:00) Kuwait, Riyadh
AtlanticStandardTime Field(GMT-04:00) Atlantic Time (Canada)
AzoresStandardTime Field(GMT-01:00) Azores
CanadaCentralStandardTime Field(GMT-06:00) Saskatchewan
CapeVerdeStandardTime Field(GMT-01:00) Cape Verde Islands
CaucasusStandardTime Field(GMT+04:00) Baku, Tbilisi, Yerevan
CenAustraliaStandardTime Field(GMT+09:30) Adelaide
CentralAmericaStandardTime Field(GMT-06:00) Central America
CentralAsiaStandardTime Field(GMT+06:00) Astana, Dhaka
CentralEuropeanStandardTime Field(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb
CentralEuropeStandardTime Field(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
CentralPacificStandardTime Field(GMT+11:00) Magadan, Solomon Islands, New Caledonia
CentralStandardTime Field(GMT-06:00) Central Time (US and Canada
ChinaStandardTime Field(GMT+08:00) Beijing, Chongqing, Hong Kong SAR, Urumqi
DatelineStandardTime Field(GMT-12:00) International Date Line West
EAfricaStandardTime Field(GMT+03:00) Nairobi
EasternStandardTime Field(GMT-05:00) Eastern Time (US and Canada)
EAustraliaStandardTime Field(GMT+10:00) Brisbane
EEuropeStandardTime Field(GMT+02:00) Bucharest
EgyptStandardTime Field(GMT+02:00) Cairo
EkaterinburgStandardTime Field(GMT+05:00) Ekaterinburg
ESouthAmericaStandardTime Field(GMT-03:00) Brasilia
FLEStandardTime Field(GMT+02:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius
GMTStandardTime Field(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London
GreenlandStandardTime Field(GMT-03:00) Greenland
GreenwichStandardTime Field(GMT) Casablanca, Monrovia
GTBStandardTime Field(GMT+02:00) Athens, Istanbul, Minsk
HawaiianStandardTime Field(GMT-10:00) Hawaii
IndiaStandardTime Field(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi
IranStandardTime Field(GMT+03:30) Tehran
IsraelStandardTime Field(GMT+02:00) Jerusalem
KoreaStandardTime Field(GMT+09:00) Seoul
MidAtlanticStandardTime Field(GMT-02:00) Mid-Atlantic
MountainStandardTime Field(GMT-07:00) Mountain Time (US and Canada)
MyanmarStandardTime Field(GMT+06:30) Yangon Rangoon
NCentralAsiaStandardTime Field(GMT+06:00) Almaty, Novosibirsk
NepalStandardTime Field(GMT+05:45) Kathmandu
NewZealandStandardTime Field(GMT+12:00) Auckland, Wellington
NorthAsiaEastStandardTime Field(GMT+08:00) Irkutsk, Ulaanbaatar
NorthAsiaStandardTime Field(GMT+07:00) Krasnoyarsk
PacificStandardTime Field(GMT-08:00) Pacific Time (US and Canada); Tijuana
RomanceStandardTime Field(GMT+01:00) Brussels, Copenhagen, Madrid, Paris
RussianStandardTime Field(GMT+03:00) Moscow, St. Petersburg, Volgograd
SamoaStandardTime Field(GMT-11:00) Midway Island, Samoa
SingaporeStandardTime Field(GMT+08:00) Kuala Lumpur, Singapore
SouthAfricaStandardTime Field(GMT+02:00) Harare, Pretoria
SriLankaStandardTime Field(GMT+06:00) Sri Jayawardenepura
TaipeiStandardTime Field(GMT+08:00) Taipei
TasmaniaStandardTime Field(GMT+10:00) Hobart
TokyoStandardTime Field(GMT+09:00) Osaka, Sapporo, Tokyo
TongaStandardTime Field(GMT+13:00) Nuku'alofa
UTC FieldCoordinated Universal Time
VladivostokStandardTime Field(GMT+10:00) Vladivostok
WAustraliaStandardTime Field(GMT+08:00) Perth
WCentralAfricaStandardTime Field(GMT+01:00) West Central Africa
WestAsiaStandardTime Field(GMT+05:00) Islamabad, Karachi, Tashkent
WestPacificStandardTime Field(GMT+10:00) Guam, Port Moresby
WEuropeStandardTime Field(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
YakutskStandardTime Field(GMT+09:00) Yakutsk

Example 1

[Robot(TimeZone = TimeZones.EasternStandardTime)]
public class NewsRobot : Robot

Example 2

using cAlgo.API;
using System;
namespace cAlgo
    // This sample indicator shows how to work with time zones
    // Every new cBot/Indicator default time zone is set to UTC via Indicator/Robot attributes TimeZone property
    // To change it you can set the attribute time zone property value to any of supported time zones
    // For example:
    // [Indicator(IsOverlay = true, TimeZone = TimeZones.EasternStandardTime, AccessRights = AccessRights.None)]
    // You can also work with different time zones programmatically by using .NET libraries\
    [Indicator(IsOverlay = true, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class TimeZoneSample : Indicator
        protected override void Initialize()
            // You can get user platform time zone offset like this
            var platformUserSelectedTimeZoneOffset = Application.UserTimeOffset;
            var estTime = GetEasternStandardTime();
        public override void Calculate(int index)
        private DateTime GetEasternStandardTime()
            var easternTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
            return TimeZoneInfo.ConvertTimeFromUtc(Server.TimeInUtc, easternTimeZone);