Lean
$LEAN_TAG$
|
Provides a means of centralizing time for various time zones. More...
Public Member Functions | |
TimeKeeper (DateTime utcDateTime, params DateTimeZone[] timeZones) | |
Initializes a new instance of the TimeKeeper class at the specified UTC time and for the specified time zones. Each time zone specified will cause the creation of a LocalTimeKeeper to handle conversions for that time zone. More... | |
TimeKeeper (DateTime utcDateTime, IEnumerable< DateTimeZone > timeZones) | |
Initializes a new instance of the TimeKeeper class at the specified UTC time and for the specified time zones. Each time zone specified will cause the creation of a LocalTimeKeeper to handle conversions for that time zone. More... | |
virtual void | SetUtcDateTime (DateTime utcDateTime) |
Sets the current UTC time for this time keeper and the attached child LocalTimeKeeper instances. More... | |
DateTime | GetTimeIn (DateTimeZone timeZone) |
Gets the local time in the specified time zone. If the specified DateTimeZone has not already been added, this will throw a KeyNotFoundException. More... | |
LocalTimeKeeper | GetLocalTimeKeeper (DateTimeZone timeZone) |
Gets the LocalTimeKeeper instance for the specified time zone More... | |
void | AddTimeZone (DateTimeZone timeZone) |
Adds the specified time zone to this time keeper More... | |
Properties | |
DateTime | UtcTime [get] |
Gets the current time in UTC More... | |
Properties inherited from QuantConnect.Interfaces.ITimeKeeper | |
DateTime | UtcTime [get] |
Gets the current time in UTC More... | |
Provides a means of centralizing time for various time zones.
Definition at line 27 of file TimeKeeper.cs.
QuantConnect.TimeKeeper.TimeKeeper | ( | DateTime | utcDateTime, |
params DateTimeZone[] | timeZones | ||
) |
Initializes a new instance of the TimeKeeper class at the specified UTC time and for the specified time zones. Each time zone specified will cause the creation of a LocalTimeKeeper to handle conversions for that time zone.
utcDateTime | The initial time |
timeZones | The time zones used to instantiate LocalTimeKeeper instances. |
Definition at line 48 of file TimeKeeper.cs.
QuantConnect.TimeKeeper.TimeKeeper | ( | DateTime | utcDateTime, |
IEnumerable< DateTimeZone > | timeZones | ||
) |
Initializes a new instance of the TimeKeeper class at the specified UTC time and for the specified time zones. Each time zone specified will cause the creation of a LocalTimeKeeper to handle conversions for that time zone.
utcDateTime | The initial time |
timeZones | The time zones used to instantiate LocalTimeKeeper instances. |
Definition at line 60 of file TimeKeeper.cs.
|
virtual |
Sets the current UTC time for this time keeper and the attached child LocalTimeKeeper instances.
utcDateTime | The current time in UTC |
Definition at line 70 of file TimeKeeper.cs.
DateTime QuantConnect.TimeKeeper.GetTimeIn | ( | DateTimeZone | timeZone | ) |
Gets the local time in the specified time zone. If the specified DateTimeZone has not already been added, this will throw a KeyNotFoundException.
timeZone | The time zone to get local time for |
Definition at line 85 of file TimeKeeper.cs.
LocalTimeKeeper QuantConnect.TimeKeeper.GetLocalTimeKeeper | ( | DateTimeZone | timeZone | ) |
Gets the LocalTimeKeeper instance for the specified time zone
timeZone | The time zone whose LocalTimeKeeper we seek |
Implements QuantConnect.Interfaces.ITimeKeeper.
Definition at line 95 of file TimeKeeper.cs.
void QuantConnect.TimeKeeper.AddTimeZone | ( | DateTimeZone | timeZone | ) |
Adds the specified time zone to this time keeper
timeZone |
Implements QuantConnect.Interfaces.ITimeKeeper.
Definition at line 110 of file TimeKeeper.cs.
|
get |
Gets the current time in UTC
Definition at line 37 of file TimeKeeper.cs.