Represents a time zone.
More...
Inherited by System.CurrentSystemTimeZone.
Represents a time zone.
Definition at line 10 of file TimeZone.cs.
◆ GetDaylightChanges()
abstract DaylightTime System.TimeZone.GetDaylightChanges |
( |
int |
year | ) |
|
|
pure virtual |
Returns the daylight saving time period for a particular year.
- Parameters
-
year | The year that the daylight saving time period applies to. |
- Returns
- A T:System.Globalization.DaylightTime object that contains the start and end date for daylight saving time in year .
- Exceptions
-
T:System.ArgumentOutOfRangeException | year is less than 1 or greater than 9999. |
◆ GetUtcOffset()
Returns the Coordinated Universal Time (UTC) offset for the specified local time.
- Parameters
-
time | A date and time value. |
- Returns
- The Coordinated Universal Time (UTC) offset from time .
◆ IsDaylightSavingTime() [1/2]
virtual bool System.TimeZone.IsDaylightSavingTime |
( |
DateTime |
time | ) |
|
|
virtual |
Returns a value indicating whether the specified date and time is within a daylight saving time period.
- Parameters
-
- Returns
true
if time is in a daylight saving time period; otherwise, false
.
Definition at line 128 of file TimeZone.cs.
◆ IsDaylightSavingTime() [2/2]
Returns a value indicating whether the specified date and time is within the specified daylight saving time period.
- Parameters
-
time | A date and time. |
daylightTimes | A daylight saving time period. |
- Returns
true
if time is in daylightTimes ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | daylightTimes is null . |
Definition at line 140 of file TimeZone.cs.
◆ ToLocalTime()
Returns the local time that corresponds to a specified date and time value.
- Parameters
-
time | A Coordinated Universal Time (UTC) time. |
- Returns
- A T:System.DateTime object whose value is the local time that corresponds to time .
Definition at line 106 of file TimeZone.cs.
◆ ToUniversalTime()
Returns the Coordinated Universal Time (UTC) that corresponds to a specified time.
- Parameters
-
- Returns
- A T:System.DateTime object whose value is the Coordinated Universal Time (UTC) that corresponds to time .
Definition at line 85 of file TimeZone.cs.
◆ CurrentTimeZone
TimeZone System.TimeZone.CurrentTimeZone |
|
staticget |
Gets the time zone of the current computer.
- Returns
- A T:System.TimeZone object that represents the current local time zone.
Definition at line 32 of file TimeZone.cs.
◆ DaylightName
abstract string System.TimeZone.DaylightName |
|
get |
Gets the daylight saving time zone name.
- Returns
- The daylight saving time zone name.
Definition at line 62 of file TimeZone.cs.
◆ StandardName
abstract string System.TimeZone.StandardName |
|
get |
Gets the standard time zone name.
- Returns
- The standard time zone name.
- Exceptions
-
T:System.ArgumentNullException | An attempt was made to set this property to null . |
Definition at line 55 of file TimeZone.cs.
The documentation for this class was generated from the following file: