System::TimeZoneInfo class
Contents
[
Hide
]TimeZoneInfo class
Represents an information destribing a particular time zone. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class TimeZoneInfo : public System::IEquatable<TimeZoneInfoPtr>
Nested classes
- Class AdjustmentRule
- Class TransitionTime
Methods
Method | Description |
---|---|
static ClearCachedData() | Clear cached time zone data. |
static ConvertTime(DateTime, const TimeZoneInfoPtr&, const TimeZoneInfoPtr&) | Convert time from one time zone to another. |
static ConvertTime(const DateTimeOffset&, const TimeZoneInfoPtr&) | Convert time to the time in a specified time zone. |
static ConvertTime(DateTime, const TimeZoneInfoPtr&) | Convert time to the time in a specified time zone. |
static ConvertTimeBySystemTimeZoneId(DateTime, const String&) | Convert time to the time in a specified time zone. |
static ConvertTimeBySystemTimeZoneId(const DateTimeOffset&, const String&) | Convert time to the time in a specified time zone. |
static ConvertTimeBySystemTimeZoneId(DateTime, const String&, const String&) | Convert time to the time in a specified time zone. |
static ConvertTimeFromUtc(DateTime, const TimeZoneInfoPtr&) | Converts UTC-time to the time in a specified time zone. |
static ConvertTimeToUtc(DateTime, const TimeZoneInfoPtr&) | Converts time to UTC-time. |
static ConvertTimeToUtc(DateTime) | Converts time to UTC-time. |
static ConvertTimeToUtcNoThrow(DateTime) | Converts time to UTC-time. FOR INTERNAL USE. |
static CreateCustomTimeZone(const String&, TimeSpan, const String&, const String&, const String&, const ArrayPtr<AdjustmentRulePtr>&, bool) | Creates a custom time zone. |
static CreateCustomTimeZone(const String&, TimeSpan, const String&, const String&, const String&, const ArrayPtr<AdjustmentRulePtr>&) | Creates a custom time zone. |
static CreateCustomTimeZone(const String&, TimeSpan, const String&, const String&) | Creates a custom time zone. |
Equals(SharedPtr<Object>) override | |
Equals(TimeZoneInfoPtr) override | Determines if the the current and specified objects are equal. |
static FindSystemTimeZoneById(const String&) | Gets time zone with specified identifier. |
get_BaseUtcOffset() const | Returns an instance of TimeSpan that represents a time interval between the current time zone’s standard time and UTC time. |
get_DaylightName() const | Gets name for the current time zone’s daylight saving time. |
get_DisplayName() const | Gets name for the current time zone. |
get_Id() const | Returns the identifier of the time zone represented by the current object. |
static get_Local() | Returns an instance of TimeZoneInfo that represents a local time zone. |
get_StandardName() const | Gets name for the current time zone’s standart time. |
get_SupportsDaylightSavingTime() const | Gets flag indicating if time zone has daylight saving time rules. |
static get_Utc() | Returns an instance of TimeZoneInfo that represents a UTC time zone. |
GetAdjustmentRules() const | Returns an array consisting of AdjustmentRule objects that represent adjustment rules that apply to the current TimeZoneInfo object. |
GetAmbiguousTimeOffsets(DateTime) const | Gets UTC dates and times that a specified date and time can be mapped to. |
GetAmbiguousTimeOffsets(const DateTimeOffset&) const | Gets UTC dates and times that a specified date and time can be mapped to. |
GetHashCode() const override | Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. |
static GetSystemTimeZones() | Gets sorted collection of all time zones available on the local system. |
GetUtcOffset(DateTime) const | Calculates difference between time in this time zone and UTC time zone for a specified date and time. |
GetUtcOffset(const DateTimeOffset&) const | Calculates difference between time in this time zone and UTC time zone for a specified date and time. |
static GetUtcOffsetFromUtc(DateTime, const TimeZoneInfoPtr&) | Internal helper function that returns the UTC offset for a UTC-datetime in a specified time zone. FOR INTERNAL USE. |
static GetUtcOffsetFromUtc(DateTime, const TimeZoneInfoPtr&, bool&, bool&) | Internal helper function that returns the UTC offset for a UTC-datetime in a specified time zone. FOR INTERNAL USE. |
GetUtcOffsetNoThrow(DateTime) const | Calculates difference between time in this time zone and UTC time zone for a specified date and time. FOR INTERNAL USE. |
HasSameRules(const TimeZoneInfoPtr&) const | Checks if current and another time zones have the same adjustment rules. |
IsAmbiguousTime(DateTime) const | Checks if specified date and time is ambiguous and can be mapped to many UTC times. |
IsAmbiguousTime(const DateTimeOffset&) const | Checks if specified date and time is ambiguous and can be mapped to many UTC times. |
IsDaylightSavingTime(DateTime) const | Checks if specified date and time falls in range of daylight saving time. |
IsDaylightSavingTime(const DateTimeOffset&) const | Checks if specified date and time falls in range of daylight saving time. |
IsDaylightSavingTimeNoThrow(DateTime) const | Checks if specified date and time falls in range of daylight saving time. |
IsInvalidTime(DateTime) const | Checks if specified date and time is invalid. |
ToString() const override | Analog of C# Object.ToString() method. Enables converting custom objects to string. |
static TransitionTimeToDateTime(int32_t, const TransitionTime&) | Helper function that converts a year and TransitionTime into a DateTime. |
Typedefs
Typedef | Description |
---|---|
AdjustmentRulePtr | An alias for a shared pointer to an instance of AdjustmentRule class. |
See Also
- Class IEquatable
- Namespace System
- Library Aspose.PUB for C++