[Serializable] |
CurrentTimeZone | Read-only Gets the time zone of the current computer system. |
DaylightName | Read-only Gets the daylight saving time zone name. |
StandardName | Read-only Gets the standard time zone name. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetDaylightChanges | Returns the daylight saving time period for a particular year. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
GetUtcOffset | Returns the coordinated universal time (UTC) offset for the specified local time. |
IsDaylightSavingTime | Overloaded:IsDaylightSavingTime(DateTime time) Returns a value indicating whether the specified date and time is within a daylight saving time period. |
IsDaylightSavingTime | Overloaded:IsDaylightSavingTime(DateTime time, DaylightTime daylightTimes) Returns a value indicating whether the specified date and time is within the specified daylight saving time period. |
ToLocalTime | Returns the local time that corresponds to a specified coordinated universal time (UTC). |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
ToUniversalTime | Returns the coordinated universal time (UTC) that corresponds to a specified local time. |
ctor #1 | Default constructor. This constructor is called by derived class constructors to initialize state in this type. Initializes a new instance of the TimeZone class. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
protected TimeZone(); |
public static TimeZone CurrentTimeZone {get;}
|
public abstract string DaylightName {get;}
|
public abstract string StandardName {get;}
|
Exception Type | Condition |
---|---|
ArgumentNullException | Attempted to set this property to null. |
~TimeZone(); |
public abstract DaylightTime GetDaylightChanges( |
year
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | year is less than 1 or greater than 9999. |
public virtual int GetHashCode(); |
public Type GetType(); |
time
local time = UTC + offset
time must be in the Gregorian calendar and the time zone represented by this instance. If time is in daylight saving time, this method returns the UTC offset to the daylight saving time zone. This method obtains the daylight saving time rule from the system.
For example, in the United States Pacific Standard time zone, which has -8 hours of offset,
GetUtcOffset(new DateTime(1999, 1, 1))
returns -288000000000.
time
public static bool IsDaylightSavingTime( |
time
daylightTimes
Exception Type | Condition |
---|---|
ArgumentNullException | daylightTimes is null. |
protected object MemberwiseClone(); |
time
local time = UTC + offset
public virtual string ToString(); |
time
UTC = local time - offset