Asposecpplib

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. More...

Inherits System::IEquatable< TimeZoneInfoPtr >.

Classes

class  AdjustmentRule
 Provides information about a time zone adjustment. 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. More...
 
class  TransitionTime
 Provides information about a time change in a time zone. More...
 

Public Types

typedef SharedPtr< AdjustmentRuleAdjustmentRulePtr
 An alias for a shared pointer to an instance of AdjustmentRule class. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 

Public Member Functions

ASPOSECPP_SHARED_API bool get_SupportsDaylightSavingTime () const
 Gets flag indicating if time zone has daylight saving time rules. More...
 
ASPOSECPP_SHARED_API TimeSpan get_BaseUtcOffset () const
 Returns an instance of TimeSpan that represents a time interval between the current time zone's standard time and UTC time. More...
 
ASPOSECPP_SHARED_API String get_DaylightName () const
 Gets name for the current time zone's daylight saving time. More...
 
ASPOSECPP_SHARED_API String get_StandardName () const
 Gets name for the current time zone's standart time. More...
 
ASPOSECPP_SHARED_API String get_DisplayName () const
 Gets name for the current time zone. More...
 
ASPOSECPP_SHARED_API String get_Id () const
 Returns the identifier of the time zone represented by the current object. More...
 
ASPOSECPP_SHARED_API ArrayPtr< AdjustmentRulePtrGetAdjustmentRules () const
 Returns an array consisting of AdjustmentRule objects that represent adjustment rules that apply to the current TimeZoneInfo object. More...
 
ASPOSECPP_SHARED_API ArrayPtr< TimeSpanGetAmbiguousTimeOffsets (const DateTime &date_time) const
 Gets UTC dates and times that a specified date and time can be mapped to. More...
 
ASPOSECPP_SHARED_API ArrayPtr< TimeSpanGetAmbiguousTimeOffsets (const DateTimeOffset &date_time_offset) const
 Gets UTC dates and times that a specified date and time can be mapped to. More...
 
ASPOSECPP_SHARED_API TimeSpan GetUtcOffset (const DateTime &date_time) const
 Calculates difference between time in this time zone and UTC time zone for a specified date and time. More...
 
TimeSpan GetUtcOffsetNoThrow (const DateTime &date_time) const
 Calculates difference between time in this time zone and UTC time zone for a specified date and time. FOR INTERNAL USE. More...
 
ASPOSECPP_SHARED_API TimeSpan GetUtcOffset (const DateTimeOffset &date_time_offset) const
 Calculates difference between time in this time zone and UTC time zone for a specified date and time. More...
 
ASPOSECPP_SHARED_API bool HasSameRules (const TimeZoneInfoPtr &other) const
 Checks if current and another time zones have the same adjustment rules. More...
 
ASPOSECPP_SHARED_API bool IsAmbiguousTime (const DateTime &date_time) const
 Checks if specified date and time is ambiguous and can be mapped to many UTC times. More...
 
ASPOSECPP_SHARED_API bool IsAmbiguousTime (const DateTimeOffset &date_time_offset) const
 Checks if specified date and time is ambiguous and can be mapped to many UTC times. More...
 
ASPOSECPP_SHARED_API bool IsDaylightSavingTime (const DateTime &date_time) const
 Checks if specified date and time falls in range of daylight saving time. More...
 
ASPOSECPP_SHARED_API bool IsDaylightSavingTimeNoThrow (const DateTime &date_time) const
 Checks if specified date and time falls in range of daylight saving time. More...
 
ASPOSECPP_SHARED_API bool IsDaylightSavingTime (const DateTimeOffset &date_time_offset) const
 Checks if specified date and time falls in range of daylight saving time. More...
 
ASPOSECPP_SHARED_API bool IsInvalidTime (const DateTime &date_time) const
 Checks if specified date and time is invalid. More...
 
ASPOSECPP_SHARED_API bool Equals (SharedPtr< Object > obj) override
 
ASPOSECPP_SHARED_API bool Equals (TimeZoneInfoPtr other) override
 Determines if the the current and specified objects are equal. More...
 
ASPOSECPP_SHARED_API int GetHashCode () const override
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
ASPOSECPP_SHARED_API String ToString () ASPOSE_CONST override
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Static Public Member Functions

static ASPOSECPP_SHARED_API TimeZoneInfoPtr get_Utc ()
 Returns an instance of TimeZoneInfo that represents a UTC time zone. More...
 
static ASPOSECPP_SHARED_API TimeZoneInfoPtr get_Local ()
 Returns an instance of TimeZoneInfo that represents a local time zone. More...
 
static ASPOSECPP_SHARED_API void ClearCachedData ()
 Clear cached time zone data. More...
 
static ASPOSECPP_SHARED_API DateTime ConvertTime (const DateTime &date_time, const TimeZoneInfoPtr &source_time_zone, const TimeZoneInfoPtr &destination_time_zone)
 Convert time from one time zone to another. More...
 
static ASPOSECPP_SHARED_API DateTimeOffset ConvertTime (const DateTimeOffset &date_time_offset, const TimeZoneInfoPtr &destination_time_zone)
 Convert time to the time in a specified time zone. More...
 
static ASPOSECPP_SHARED_API DateTime ConvertTime (const DateTime &date_time, const TimeZoneInfoPtr &destination_time_zone)
 Convert time to the time in a specified time zone. More...
 
static ASPOSECPP_SHARED_API DateTime ConvertTimeBySystemTimeZoneId (const DateTime &date_time, const String &destination_time_zone_id)
 Convert time to the time in a specified time zone. More...
 
static ASPOSECPP_SHARED_API DateTimeOffset ConvertTimeBySystemTimeZoneId (const DateTimeOffset &date_time_offset, const String &destination_time_zone_id)
 Convert time to the time in a specified time zone. More...
 
static ASPOSECPP_SHARED_API DateTime ConvertTimeBySystemTimeZoneId (const DateTime &date_time, const String &source_time_zone_id, const String &destination_time_zone_id)
 Convert time to the time in a specified time zone. More...
 
static ASPOSECPP_SHARED_API DateTime ConvertTimeFromUtc (const DateTime &date_time, const TimeZoneInfoPtr &destination_time_zone)
 Converts UTC-time to the time in a specified time zone. More...
 
static ASPOSECPP_SHARED_API DateTime ConvertTimeToUtc (const DateTime &date_time, const TimeZoneInfoPtr &source_time_zone)
 Converts time to UTC-time. More...
 
static ASPOSECPP_SHARED_API DateTime ConvertTimeToUtc (const DateTime &date_time)
 Converts time to UTC-time. More...
 
static DateTime ConvertTimeToUtcNoThrow (const DateTime &date_time)
 Converts time to UTC-time. FOR INTERNAL USE. More...
 
static ASPOSECPP_SHARED_API TimeZoneInfoPtr CreateCustomTimeZone (const String &id, const TimeSpan &base_utc_offset, const String &display_name, const String &standard_display_name, const String &daylight_display_name, const ArrayPtr< AdjustmentRulePtr > &adjustment_rules, bool disable_daylight_saving_time)
 Creates a custom time zone. More...
 
static ASPOSECPP_SHARED_API TimeZoneInfoPtr CreateCustomTimeZone (const String &id, const TimeSpan &base_utc_offset, const String &display_name, const String &standard_display_name, const String &daylight_display_name, const ArrayPtr< AdjustmentRulePtr > &adjustment_rules)
 Creates a custom time zone. More...
 
static ASPOSECPP_SHARED_API TimeZoneInfoPtr CreateCustomTimeZone (const String &id, const TimeSpan &base_utc_offset, const String &display_name, const String &standard_display_name)
 Creates a custom time zone. More...
 
static ASPOSECPP_SHARED_API TimeZoneInfoPtr FindSystemTimeZoneById (const String &id)
 Gets time zone with specified identifier. More...
 
static ASPOSECPP_SHARED_API SharedPtr< System::Collections::ObjectModel::ReadOnlyCollection< TimeZoneInfoPtr > > GetSystemTimeZones ()
 Gets sorted collection of all time zones available on the local system. More...
 
static TimeSpan GetUtcOffsetFromUtc (const DateTime &time, const TimeZoneInfoPtr &zone)
 Internal helper function that returns the UTC offset for a UTC-datetime in a specified time zone. FOR INTERNAL USE. More...
 
static TimeSpan GetUtcOffsetFromUtc (const DateTime &time, const TimeZoneInfoPtr &zone, bool &is_daylight_savings, bool &is_ambiguous_local_dst)
 Internal helper function that returns the UTC offset for a UTC-datetime in a specified time zone. FOR INTERNAL USE. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

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.

Member Typedef Documentation

◆ AdjustmentRulePtr

An alias for a shared pointer to an instance of AdjustmentRule class.

Member Function Documentation

◆ ClearCachedData()

static ASPOSECPP_SHARED_API void System::TimeZoneInfo::ClearCachedData ( )
static

Clear cached time zone data.

◆ ConvertTime() [1/3]

static ASPOSECPP_SHARED_API DateTime System::TimeZoneInfo::ConvertTime ( const DateTime date_time,
const TimeZoneInfoPtr source_time_zone,
const TimeZoneInfoPtr destination_time_zone 
)
static

Convert time from one time zone to another.

Parameters
date_timeDate and time to convert.
source_time_zoneSource time zone.
destination_time_zoneDestination time zone.
Returns
Converted date and time.

◆ ConvertTime() [2/3]

static ASPOSECPP_SHARED_API DateTimeOffset System::TimeZoneInfo::ConvertTime ( const DateTimeOffset date_time_offset,
const TimeZoneInfoPtr destination_time_zone 
)
static

Convert time to the time in a specified time zone.

Parameters
date_time_offsetDate and time to convert.
destination_time_zoneDestination time zone.
Returns
Converted date and time.

◆ ConvertTime() [3/3]

static ASPOSECPP_SHARED_API DateTime System::TimeZoneInfo::ConvertTime ( const DateTime date_time,
const TimeZoneInfoPtr destination_time_zone 
)
static

Convert time to the time in a specified time zone.

Parameters
date_timeDate and time to convert.
destination_time_zoneDestination time zone.
Returns
Converted date and time.

◆ ConvertTimeBySystemTimeZoneId() [1/3]

static ASPOSECPP_SHARED_API DateTime System::TimeZoneInfo::ConvertTimeBySystemTimeZoneId ( const DateTime date_time,
const String destination_time_zone_id 
)
static

Convert time to the time in a specified time zone.

Parameters
date_timeDate and time to convert.
destination_time_zone_idIdentifier of the destination time zone.
Returns
Converted date and time.

◆ ConvertTimeBySystemTimeZoneId() [2/3]

static ASPOSECPP_SHARED_API DateTimeOffset System::TimeZoneInfo::ConvertTimeBySystemTimeZoneId ( const DateTimeOffset date_time_offset,
const String destination_time_zone_id 
)
static

Convert time to the time in a specified time zone.

Parameters
date_time_offsetDate and time to convert.
destination_time_zone_idIdentifier of the destination time zone.
Returns
Converted date and time.

◆ ConvertTimeBySystemTimeZoneId() [3/3]

static ASPOSECPP_SHARED_API DateTime System::TimeZoneInfo::ConvertTimeBySystemTimeZoneId ( const DateTime date_time,
const String source_time_zone_id,
const String destination_time_zone_id 
)
static

Convert time to the time in a specified time zone.

Parameters
date_timeDate and time to convert.
source_time_zone_idIdentifier of the source time zone.
destination_time_zone_idIdentifier of the destination time zone.
Returns
Converted date and time.

◆ ConvertTimeFromUtc()

static ASPOSECPP_SHARED_API DateTime System::TimeZoneInfo::ConvertTimeFromUtc ( const DateTime date_time,
const TimeZoneInfoPtr destination_time_zone 
)
static

Converts UTC-time to the time in a specified time zone.

Parameters
date_timeDate and time to convert.
destination_time_zoneDestination time zone.
Returns
Converted date and time.

◆ ConvertTimeToUtc() [1/2]

static ASPOSECPP_SHARED_API DateTime System::TimeZoneInfo::ConvertTimeToUtc ( const DateTime date_time,
const TimeZoneInfoPtr source_time_zone 
)
static

Converts time to UTC-time.

Parameters
date_timeDate and time to convert.
source_time_zoneSource time zone.
Returns
Converted date and time.

◆ ConvertTimeToUtc() [2/2]

static ASPOSECPP_SHARED_API DateTime System::TimeZoneInfo::ConvertTimeToUtc ( const DateTime date_time)
static

Converts time to UTC-time.

Parameters
date_timeDate and time to convert.
Returns
Converted date and time.

◆ ConvertTimeToUtcNoThrow()

static DateTime System::TimeZoneInfo::ConvertTimeToUtcNoThrow ( const DateTime date_time)
static

Converts time to UTC-time. FOR INTERNAL USE.

Parameters
date_timeDate and time to convert.
Returns
Converted date and time.

◆ CreateCustomTimeZone() [1/3]

static ASPOSECPP_SHARED_API TimeZoneInfoPtr System::TimeZoneInfo::CreateCustomTimeZone ( const String id,
const TimeSpan base_utc_offset,
const String display_name,
const String standard_display_name,
const String daylight_display_name,
const ArrayPtr< AdjustmentRulePtr > &  adjustment_rules,
bool  disable_daylight_saving_time 
)
static

Creates a custom time zone.

Parameters
idTime zone identifier.
base_utc_offsetTime interval between the current time zone's standard time and UTC time.
display_nameDisplay name.
standard_display_nameStandard time name.
daylight_display_nameDaylight saving time name.
adjustment_rulesArray of adjustment rules.
disable_daylight_saving_timeTrue to discard any daylight saving time information present in adjustment_rules.
Returns
New time zone.

◆ CreateCustomTimeZone() [2/3]

static ASPOSECPP_SHARED_API TimeZoneInfoPtr System::TimeZoneInfo::CreateCustomTimeZone ( const String id,
const TimeSpan base_utc_offset,
const String display_name,
const String standard_display_name,
const String daylight_display_name,
const ArrayPtr< AdjustmentRulePtr > &  adjustment_rules 
)
static

Creates a custom time zone.

Parameters
idTime zone identifier.
base_utc_offsetTime interval between the current time zone's standard time and UTC time.
display_nameDisplay name.
standard_display_nameStandard time name.
daylight_display_nameDaylight saving time name.
adjustment_rulesArray of adjustment rules.
Returns
New time zone.

◆ CreateCustomTimeZone() [3/3]

static ASPOSECPP_SHARED_API TimeZoneInfoPtr System::TimeZoneInfo::CreateCustomTimeZone ( const String id,
const TimeSpan base_utc_offset,
const String display_name,
const String standard_display_name 
)
static

Creates a custom time zone.

Parameters
idTime zone identifier.
base_utc_offsetTime interval between the current time zone's standard time and UTC time.
display_nameDisplay name.
standard_display_nameStandard time name.
Returns
New time zone.

◆ Equals() [1/2]

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::Equals ( SharedPtr< Object obj)
override

◆ Equals() [2/2]

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::Equals ( TimeZoneInfoPtr  other)
overridevirtual

Determines if the the current and specified objects are equal.

Parameters
otherThe object to compare the current object with
Returns
True if the objects are equal, otherwise - false

Implements System::IEquatable< TimeZoneInfoPtr >.

◆ FindSystemTimeZoneById()

static ASPOSECPP_SHARED_API TimeZoneInfoPtr System::TimeZoneInfo::FindSystemTimeZoneById ( const String id)
static

Gets time zone with specified identifier.

Parameters
idTime zone identifier.
Returns
Time zone with specified identifier.

◆ get_BaseUtcOffset()

ASPOSECPP_SHARED_API TimeSpan System::TimeZoneInfo::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()

ASPOSECPP_SHARED_API String System::TimeZoneInfo::get_DaylightName ( ) const

Gets name for the current time zone's daylight saving time.

◆ get_DisplayName()

ASPOSECPP_SHARED_API String System::TimeZoneInfo::get_DisplayName ( ) const

Gets name for the current time zone.

◆ get_Id()

ASPOSECPP_SHARED_API String System::TimeZoneInfo::get_Id ( ) const

Returns the identifier of the time zone represented by the current object.

◆ get_Local()

static ASPOSECPP_SHARED_API TimeZoneInfoPtr System::TimeZoneInfo::get_Local ( )
static

Returns an instance of TimeZoneInfo that represents a local time zone.

◆ get_StandardName()

ASPOSECPP_SHARED_API String System::TimeZoneInfo::get_StandardName ( ) const

Gets name for the current time zone's standart time.

◆ get_SupportsDaylightSavingTime()

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::get_SupportsDaylightSavingTime ( ) const

Gets flag indicating if time zone has daylight saving time rules.

◆ get_Utc()

static ASPOSECPP_SHARED_API TimeZoneInfoPtr System::TimeZoneInfo::get_Utc ( )
static

Returns an instance of TimeZoneInfo that represents a UTC time zone.

◆ GetAdjustmentRules()

ASPOSECPP_SHARED_API ArrayPtr<AdjustmentRulePtr> System::TimeZoneInfo::GetAdjustmentRules ( ) const

Returns an array consisting of AdjustmentRule objects that represent adjustment rules that apply to the current TimeZoneInfo object.

◆ GetAmbiguousTimeOffsets() [1/2]

ASPOSECPP_SHARED_API ArrayPtr<TimeSpan> System::TimeZoneInfo::GetAmbiguousTimeOffsets ( const DateTime date_time) const

Gets UTC dates and times that a specified date and time can be mapped to.

Parameters
date_timeDate and time.
Returns
Array of UTC dates and times.

◆ GetAmbiguousTimeOffsets() [2/2]

ASPOSECPP_SHARED_API ArrayPtr<TimeSpan> System::TimeZoneInfo::GetAmbiguousTimeOffsets ( const DateTimeOffset date_time_offset) const

Gets UTC dates and times that a specified date and time can be mapped to.

Parameters
date_time_offsetDate and time.
Returns
Array of UTC dates and times.

◆ GetHashCode()

ASPOSECPP_SHARED_API int System::TimeZoneInfo::GetHashCode ( ) const
overridevirtual

Analog of C# Object.GetHashCode() method. Enables hashing of custom objects.

Returns
Hash code value as calculated by corresponding class.

Reimplemented from System::Object.

◆ GetSystemTimeZones()

static ASPOSECPP_SHARED_API SharedPtr<System::Collections::ObjectModel::ReadOnlyCollection<TimeZoneInfoPtr> > System::TimeZoneInfo::GetSystemTimeZones ( )
static

Gets sorted collection of all time zones available on the local system.

Returns
Collection of TimeZoneInfo objects.

◆ GetUtcOffset() [1/2]

ASPOSECPP_SHARED_API TimeSpan System::TimeZoneInfo::GetUtcOffset ( const DateTime date_time) const

Calculates difference between time in this time zone and UTC time zone for a specified date and time.

Parameters
date_timeDate and time.
Returns
Time difference between time zones.

◆ GetUtcOffset() [2/2]

ASPOSECPP_SHARED_API TimeSpan System::TimeZoneInfo::GetUtcOffset ( const DateTimeOffset date_time_offset) const

Calculates difference between time in this time zone and UTC time zone for a specified date and time.

Parameters
date_time_offsetDate and time.
Returns
Time difference between time zones.

◆ GetUtcOffsetFromUtc() [1/2]

static TimeSpan System::TimeZoneInfo::GetUtcOffsetFromUtc ( const DateTime time,
const TimeZoneInfoPtr zone 
)
static

Internal helper function that returns the UTC offset for a UTC-datetime in a specified time zone. FOR INTERNAL USE.

◆ GetUtcOffsetFromUtc() [2/2]

static TimeSpan System::TimeZoneInfo::GetUtcOffsetFromUtc ( const DateTime time,
const TimeZoneInfoPtr zone,
bool &  is_daylight_savings,
bool &  is_ambiguous_local_dst 
)
static

Internal helper function that returns the UTC offset for a UTC-datetime in a specified time zone. FOR INTERNAL USE.

◆ GetUtcOffsetNoThrow()

TimeSpan System::TimeZoneInfo::GetUtcOffsetNoThrow ( const DateTime date_time) const

Calculates difference between time in this time zone and UTC time zone for a specified date and time. FOR INTERNAL USE.

Parameters
date_timeDate and time.
Returns
Time difference between time zones.

◆ HasSameRules()

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::HasSameRules ( const TimeZoneInfoPtr other) const

Checks if current and another time zones have the same adjustment rules.

Parameters
otherTime zone info.
Returns
True if time zones have identical adjustment rules.

◆ IsAmbiguousTime() [1/2]

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::IsAmbiguousTime ( const DateTime date_time) const

Checks if specified date and time is ambiguous and can be mapped to many UTC times.

Parameters
date_timeDate and Time.
Returns
True if date_time is ambiguous.

◆ IsAmbiguousTime() [2/2]

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::IsAmbiguousTime ( const DateTimeOffset date_time_offset) const

Checks if specified date and time is ambiguous and can be mapped to many UTC times.

Parameters
date_time_offsetDate and Time.
Returns
True if date_time is ambiguous.

◆ IsDaylightSavingTime() [1/2]

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::IsDaylightSavingTime ( const DateTime date_time) const

Checks if specified date and time falls in range of daylight saving time.

Parameters
date_timeDate and Time.
Returns
True if date_time is a daylight saving time.

◆ IsDaylightSavingTime() [2/2]

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::IsDaylightSavingTime ( const DateTimeOffset date_time_offset) const

Checks if specified date and time falls in range of daylight saving time.

Parameters
date_time_offsetDate and Time.
Returns
True if date_time is a daylight saving time.

◆ IsDaylightSavingTimeNoThrow()

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::IsDaylightSavingTimeNoThrow ( const DateTime date_time) const

Checks if specified date and time falls in range of daylight saving time.

Parameters
date_timeDate and Time.
Returns
True if date_time is a daylight saving time.

◆ IsInvalidTime()

ASPOSECPP_SHARED_API bool System::TimeZoneInfo::IsInvalidTime ( const DateTime date_time) const

Checks if specified date and time is invalid.

Parameters
date_timeDate and Time.
Returns
True is date_time is invalid.

◆ ToString()

ASPOSECPP_SHARED_API String System::TimeZoneInfo::ToString ( )
overridevirtual

Analog of C# Object.ToString() method. Enables converting custom objects to string.

Returns
String representation as provided by final class.

Reimplemented from System::Object.