Skip to content

TimeZones

Summary

Standard TimeZones class.

Remarks

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

Signature

1
public static class TimeZones

Namespace

cAlgo.API

Examples

1
2
 [Robot(TimeZone = TimeZones.EasternStandardTime)]
 public class NewsRobot : Robot
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 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();
             Print(estTime.ToString("o"));
         }
         public override void Calculate(int index)
         {
         }
         private DateTime GetEasternStandardTime()
         {
             var easternTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");
             return TimeZoneInfo.ConvertTimeFromUtc(Server.TimeInUtc, easternTimeZone);
         }
     }
 }

Fields

DatelineStandardTime

Summary

(GMT-12:00) International Date Line West

Signature

1
public static string DatelineStandardTime;

Return Value

string

SamoaStandardTime

Summary

(GMT-11:00) Midway Island, Samoa

Signature

1
public static string SamoaStandardTime;

Return Value

string

HawaiianStandardTime

Summary

(GMT-10:00) Hawaii

Signature

1
public static string HawaiianStandardTime;

Return Value

string

AlaskanStandardTime

Summary

(GMT-09:00) Alaska

Signature

1
public static string AlaskanStandardTime;

Return Value

string

PacificStandardTime

Summary

(GMT-08:00) Pacific Time (US and Canada); Tijuana

Signature

1
public static string PacificStandardTime;

Return Value

string

MountainStandardTime

Summary

(GMT-07:00) Mountain Time (US and Canada)

Signature

1
public static string MountainStandardTime;

Return Value

string

CentralStandardTime

Summary

(GMT-06:00) Central Time (US and Canada

Signature

1
public static string CentralStandardTime;

Return Value

string

CanadaCentralStandardTime

Summary

(GMT-06:00) Saskatchewan

Signature

1
public static string CanadaCentralStandardTime;

Return Value

string

CentralAmericaStandardTime

Summary

(GMT-06:00) Central America

Signature

1
public static string CentralAmericaStandardTime;

Return Value

string

EasternStandardTime

Summary

(GMT-05:00) Eastern Time (US and Canada)

Signature

1
public static string EasternStandardTime;

Return Value

string

AtlanticStandardTime

Summary

(GMT-04:00) Atlantic Time (Canada)

Signature

1
public static string AtlanticStandardTime;

Return Value

string

ESouthAmericaStandardTime

Summary

(GMT-03:00) Brasilia

Signature

1
public static string ESouthAmericaStandardTime;

Return Value

string

GreenlandStandardTime

Summary

(GMT-03:00) Greenland

Signature

1
public static string GreenlandStandardTime;

Return Value

string

MidAtlanticStandardTime

Summary

(GMT-02:00) Mid-Atlantic

Signature

1
public static string MidAtlanticStandardTime;

Return Value

string

AzoresStandardTime

Summary

(GMT-01:00) Azores

Signature

1
public static string AzoresStandardTime;

Return Value

string

CapeVerdeStandardTime

Summary

(GMT-01:00) Cape Verde Islands

Signature

1
public static string CapeVerdeStandardTime;

Return Value

string

GMTStandardTime

Summary

(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London

Signature

1
public static string GMTStandardTime;

Return Value

string

GreenwichStandardTime

Summary

(GMT) Casablanca, Monrovia

Signature

1
public static string GreenwichStandardTime;

Return Value

string

CentralEuropeStandardTime

Summary

(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague

Signature

1
public static string CentralEuropeStandardTime;

Return Value

string

CentralEuropeanStandardTime

Summary

(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb

Signature

1
public static string CentralEuropeanStandardTime;

Return Value

string

RomanceStandardTime

Summary

(GMT+01:00) Brussels, Copenhagen, Madrid, Paris

Signature

1
public static string RomanceStandardTime;

Return Value

string

WEuropeStandardTime

Summary

(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna

Signature

1
public static string WEuropeStandardTime;

Return Value

string

WCentralAfricaStandardTime

Summary

(GMT+01:00) West Central Africa

Signature

1
public static string WCentralAfricaStandardTime;

Return Value

string

EEuropeStandardTime

Summary

(GMT+02:00) Bucharest

Signature

1
public static string EEuropeStandardTime;

Return Value

string

EgyptStandardTime

Summary

(GMT+02:00) Cairo

Signature

1
public static string EgyptStandardTime;

Return Value

string

FLEStandardTime

Summary

(GMT+02:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius

Signature

1
public static string FLEStandardTime;

Return Value

string

GTBStandardTime

Summary

(GMT+02:00) Athens, Istanbul, Minsk

Signature

1
public static string GTBStandardTime;

Return Value

string

IsraelStandardTime

Summary

(GMT+02:00) Jerusalem

Signature

1
public static string IsraelStandardTime;

Return Value

string

SouthAfricaStandardTime

Summary

(GMT+02:00) Harare, Pretoria

Signature

1
public static string SouthAfricaStandardTime;

Return Value

string

RussianStandardTime

Summary

(GMT+03:00) Moscow, St. Petersburg, Volgograd

Signature

1
public static string RussianStandardTime;

Return Value

string

ArabStandardTime

Summary

(GMT+03:00) Kuwait, Riyadh

Signature

1
public static string ArabStandardTime;

Return Value

string

EAfricaStandardTime

Summary

(GMT+03:00) Nairobi

Signature

1
public static string EAfricaStandardTime;

Return Value

string

ArabicStandardTime

Summary

(GMT+03:00) Baghdad

Signature

1
public static string ArabicStandardTime;

Return Value

string

IranStandardTime

Summary

(GMT+03:30) Tehran

Signature

1
public static string IranStandardTime;

Return Value

string

ArabianStandardTime

Summary

(GMT+04:00) Abu Dhabi, Muscat

Signature

1
public static string ArabianStandardTime;

Return Value

string

CaucasusStandardTime

Summary

(GMT+04:00) Baku, Tbilisi, Yerevan

Signature

1
public static string CaucasusStandardTime;

Return Value

string

EkaterinburgStandardTime

Summary

(GMT+05:00) Ekaterinburg

Signature

1
public static string EkaterinburgStandardTime;

Return Value

string

WestAsiaStandardTime

Summary

(GMT+05:00) Islamabad, Karachi, Tashkent

Signature

1
public static string WestAsiaStandardTime;

Return Value

string

IndiaStandardTime

Summary

(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi

Signature

1
public static string IndiaStandardTime;

Return Value

string

NepalStandardTime

Summary

(GMT+05:45) Kathmandu

Signature

1
public static string NepalStandardTime;

Return Value

string

CentralAsiaStandardTime

Summary

(GMT+06:00) Astana, Dhaka

Signature

1
public static string CentralAsiaStandardTime;

Return Value

string

SriLankaStandardTime

Summary

(GMT+06:00) Sri Jayawardenepura

Signature

1
public static string SriLankaStandardTime;

Return Value

string

NCentralAsiaStandardTime

Summary

(GMT+06:00) Almaty, Novosibirsk

Signature

1
public static string NCentralAsiaStandardTime;

Return Value

string

MyanmarStandardTime

Summary

(GMT+06:30) Yangon Rangoon

Signature

1
public static string MyanmarStandardTime;

Return Value

string

NorthAsiaStandardTime

Summary

(GMT+07:00) Krasnoyarsk

Signature

1
public static string NorthAsiaStandardTime;

Return Value

string

ChinaStandardTime

Summary

(GMT+08:00) Beijing, Chongqing, Hong Kong SAR, Urumqi

Signature

1
public static string ChinaStandardTime;

Return Value

string

SingaporeStandardTime

Summary

(GMT+08:00) Kuala Lumpur, Singapore

Signature

1
public static string SingaporeStandardTime;

Return Value

string

TaipeiStandardTime

Summary

(GMT+08:00) Taipei

Signature

1
public static string TaipeiStandardTime;

Return Value

string

WAustraliaStandardTime

Summary

(GMT+08:00) Perth

Signature

1
public static string WAustraliaStandardTime;

Return Value

string

NorthAsiaEastStandardTime

Summary

(GMT+08:00) Irkutsk, Ulaanbaatar

Signature

1
public static string NorthAsiaEastStandardTime;

Return Value

string

KoreaStandardTime

Summary

(GMT+09:00) Seoul

Signature

1
public static string KoreaStandardTime;

Return Value

string

TokyoStandardTime

Summary

(GMT+09:00) Osaka, Sapporo, Tokyo

Signature

1
public static string TokyoStandardTime;

Return Value

string

YakutskStandardTime

Summary

(GMT+09:00) Yakutsk

Signature

1
public static string YakutskStandardTime;

Return Value

string

CenAustraliaStandardTime

Summary

(GMT+09:30) Adelaide

Signature

1
public static string CenAustraliaStandardTime;

Return Value

string

EAustraliaStandardTime

Summary

(GMT+10:00) Brisbane

Signature

1
public static string EAustraliaStandardTime;

Return Value

string

TasmaniaStandardTime

Summary

(GMT+10:00) Hobart

Signature

1
public static string TasmaniaStandardTime;

Return Value

string

VladivostokStandardTime

Summary

(GMT+10:00) Vladivostok

Signature

1
public static string VladivostokStandardTime;

Return Value

string

WestPacificStandardTime

Summary

(GMT+10:00) Guam, Port Moresby

Signature

1
public static string WestPacificStandardTime;

Return Value

string

CentralPacificStandardTime

Summary

(GMT+11:00) Magadan, Solomon Islands, New Caledonia

Signature

1
public static string CentralPacificStandardTime;

Return Value

string

NewZealandStandardTime

Summary

(GMT+12:00) Auckland, Wellington

Signature

1
public static string NewZealandStandardTime;

Return Value

string

TongaStandardTime

Summary

(GMT+13:00) Nuku'alofa

Signature

1
public static string TongaStandardTime;

Return Value

string

UTC

Summary

Coordinated Universal Time

Signature

1
public static string UTC;

Return Value

string