|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Represents any time zone in the world. More...
#include <TimeZoneInfo.h>
Public Member Functions | |
| bool | Equals (const TimeZoneInfo &other) const |
| Determines whether the current TimeZoneInfo object and another TimeZoneInfo object are equal. | |
| TimeSpan | GetBaseUtcOffset () const |
| Gets the time difference between the current time zone's standard time and Coordinated Universal Time (UTC). | |
| String | GetDaylightName () const |
| Gets the display name for the time zone's daylight saving time. | |
| String | GetDisplayName () const |
| Gets the general display name that represents the time zone. | |
| String | GetId () const |
| Gets the time zone identifier. | |
| String | GetStandardName () const |
| Gets the display name for the time zone's standard time. | |
| TimeSpan | GetUtcOffset (const DateTimeOffset &dateTimeOffset) const |
| Calculates the offset or difference between the time in this time zone and UTC for a particular point in time. | |
| bool | IsDaylightSavingTime (const DateTimeOffset &dateTimeOffset) const |
| Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current TimeZoneInfo object. | |
| bool | SupportsDaylightSavingTime () const |
| Gets a value that indicates whether the time zone has any daylight saving time rules. | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Static Public Member Functions | |
| static DateTimeOffset | ConvertTime (const DateTimeOffset &dateTimeOffset, const TimeZoneInfo &destinationTimeZone) |
| Converts a time to the time in another time zone. | |
| static DateTimeOffset | ConvertTime (const DateTimeOffset &dateTimeOffset, const TimeZoneInfo &sourceTimeZone, const TimeZoneInfo &destinationTimeZone) |
| Converts a time to the time in another time zone based on source and destination time zones. | |
| static TimeZoneInfo | FindSystemTimeZoneById (const String &id) |
| Retrieves a TimeZoneInfo object from the registry or system database based on its identifier. | |
| static TimeZoneInfo | Local () |
| Gets a TimeZoneInfo object that represents the local time zone. | |
| static TimeZoneInfo | Utc () |
| Gets a TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone. | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Represents any time zone in the world.
Definition at line 23 of file TimeZoneInfo.h.
|
static |
Converts a time to the time in another time zone.
| dateTimeOffset | The date and time to convert. |
| destinationTimeZone | The time zone to convert dateTimeOffset to. |
Transform timestamp into destination time zone representation.
Definition at line 63 of file TimeZoneInfo.cpp.
References ConvertTime().
Referenced by ConvertTime(), and ConvertTime().
|
static |
Converts a time to the time in another time zone based on source and destination time zones.
Transform timestamp from source to destination time zone.
Definition at line 68 of file TimeZoneInfo.cpp.
References ConvertTime().
| bool DotNetDupe::System::TimeZoneInfo::Equals | ( | const TimeZoneInfo & | other | ) | const |
Determines whether the current TimeZoneInfo object and another TimeZoneInfo object are equal.
Compare equivalence using canonical zone identifier.
Definition at line 79 of file TimeZoneInfo.cpp.
References Equals().
Referenced by Equals().
|
static |
Retrieves a TimeZoneInfo object from the registry or system database based on its identifier.
| id | The time zone identifier. |
Lookup system time zone database by key identifier.
Definition at line 73 of file TimeZoneInfo.cpp.
References FindSystemTimeZoneById(), and Utc().
Referenced by FindSystemTimeZoneById().
| TimeSpan DotNetDupe::System::TimeZoneInfo::GetBaseUtcOffset | ( | ) | const |
Gets the time difference between the current time zone's standard time and Coordinated Universal Time (UTC).
Definition at line 21 of file TimeZoneInfo.cpp.
References GetBaseUtcOffset().
Referenced by GetBaseUtcOffset().
| String DotNetDupe::System::TimeZoneInfo::GetDaylightName | ( | ) | const |
Gets the display name for the time zone's daylight saving time.
Definition at line 20 of file TimeZoneInfo.cpp.
References GetDaylightName().
Referenced by GetDaylightName().
| String DotNetDupe::System::TimeZoneInfo::GetDisplayName | ( | ) | const |
Gets the general display name that represents the time zone.
Definition at line 18 of file TimeZoneInfo.cpp.
References GetDisplayName().
Referenced by GetDisplayName().
| String DotNetDupe::System::TimeZoneInfo::GetId | ( | ) | const |
Gets the time zone identifier.
Definition at line 17 of file TimeZoneInfo.cpp.
References GetId().
Referenced by GetId().
| String DotNetDupe::System::TimeZoneInfo::GetStandardName | ( | ) | const |
Gets the display name for the time zone's standard time.
Definition at line 19 of file TimeZoneInfo.cpp.
References GetStandardName().
Referenced by GetStandardName().
| TimeSpan DotNetDupe::System::TimeZoneInfo::GetUtcOffset | ( | const DateTimeOffset & | dateTimeOffset | ) | const |
Calculates the offset or difference between the time in this time zone and UTC for a particular point in time.
| dateTimeOffset | The date and time to determine the offset for. |
Compute effective UTC offset.
Definition at line 51 of file TimeZoneInfo.cpp.
References GetUtcOffset().
Referenced by GetUtcOffset().
| bool DotNetDupe::System::TimeZoneInfo::IsDaylightSavingTime | ( | const DateTimeOffset & | dateTimeOffset | ) | const |
Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current TimeZoneInfo object.
| dateTimeOffset | A date and time value. |
Check daylight saving activation for the given timestamp.
Definition at line 57 of file TimeZoneInfo.cpp.
References IsDaylightSavingTime().
Referenced by IsDaylightSavingTime().
|
static |
Gets a TimeZoneInfo object that represents the local time zone.
Query dynamic time zone details from the Windows kernel.
Extract time zone key identifier, UTC bias, and standard/daylight names.
Return configured local time zone representation.
Definition at line 24 of file TimeZoneInfo.cpp.
References Local(), Utc(), and DotNetDupe::System::Internal::WCharToUtf8().
Referenced by Local().
| bool DotNetDupe::System::TimeZoneInfo::SupportsDaylightSavingTime | ( | ) | const |
Gets a value that indicates whether the time zone has any daylight saving time rules.
Definition at line 22 of file TimeZoneInfo.cpp.
References SupportsDaylightSavingTime().
Referenced by SupportsDaylightSavingTime().
|
static |
Gets a TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone.
Return static constant UTC representation with zero bias.
Definition at line 46 of file TimeZoneInfo.cpp.
References Utc().
Referenced by FindSystemTimeZoneById(), Local(), and Utc().