System.Core 3.5.0.0 System.Object System.IEquatable<System.TimeZoneInfo> System.Runtime.Serialization.IDeserializationCallback System.Runtime.Serialization.ISerializable

A time zone is a geographical region in which the same time is used.

The class offers significant enhancements over the class, which provides only limited functionality.

The class recognizes only the local time zone, and can convert times between Coordinated Universal Time (UTC) and local time. A object can represent any time zone, and methods of the class can be used to convert the time in one time zone to the corresponding time in any other time zone. The members of the class support the following operations:

Retrieving a time zone that is already defined by the operating system.

Enumerating the time zones that are available on a system.

Converting times between different time zones.

Creating a new time zone that is not already defined by the operating system.

Serializing a time zone for later retrieval.

An instance of the class is immutable. Once an object has been instantiated, its values cannot be modified.

You cannot instantiate a object using the new keyword. Instead, you must call one of the static members of the class shown in the following table.

Static member name

Description

method

Creates a custom time zone from application-supplied data.

method

Instantiates a time zone defined in the system registry based on the zone's identifier.

method

Deserializes a string value to re-create a previously serialized object.

method

Returns an enumerable of objects that represents all time zones that are available on the local system.

property

Instantiates a object that represents the local time zone.

property

Instantiates a object that represents the UTC zone.

You can use the method to create a time zone that is not defined in the local system registry. You can then use the property to save the time zone object's information as a string, which can be stored in some form that is accessible to the application. You can use the method to convert a serialized string back to a object.

Represents any time zone in the world.

- Property
  3.5.0.0
  System.TimeSpan To be added.

  The time span returned by the property can range from 14 hours (for a time zone that is 14 hours ahead of Coordinated Universal Time (UTC)) to -14 hours (for a time zone that is 14 hours behind UTC). Time zones that are ahead of UTC have a positive offset; time zones that are behind UTC have a negative offset.

  The value is represented as a whole number of minutes. It cannot include a fractional number of minutes.

  Because is a property of the object rather than the object, the class applies a single offset from UTC to all of a time zone's adjustments. To reflect a time zone that has modified its offset from UTC, you must create a new time zone using the method.

  The property differs from the method in the following ways:

  The property returns the difference between UTC and the time zone's standard time; the method returns the difference between UTC and the time zone's time at a particular point in time.

  The method reflects the application of any adjustment rules to the time zone; the property does not.

  Gets the time difference between the current time zone's standard time and Coordinated Universal Time (UTC).

- Method
  3.5.0.0
  System.Void

  Cached time zone data includes data on the local time zone, the Coordinated Universal Time (UTC) zone, and any time zones that are retrieved by using methods such as and .

  You might call the method to reduce the memory devoted to the application's cache of time zone information or to reflect the fact that the local system's time zone has changed.

  Storing references to the local and UTC time zones is not recommended. After the call to the method, these object variables will be undefined objects that are no longer references to or . For example, in the following code, the second call to the method throws an because the variable is no longer considered equal to .

  code reference: System.TimeZone2.BestPractices#1

  Clears cached time zone data.

- Method
  3.5.0.0
  System.DateTime `` ``

  When performing the conversion, the method applies any adjustment rules in effect in the time zone.

  This overload of the method determines the source time zone from the value of the parameter's property, as the following table shows.

  Kind property value

  Source time zone

  Method behavior

  Converts the local time to the time in .

  Converts Coordinated Universal Time (UTC) to the time in .

  Assumed to be .

  Converts the local time to the time in .

  The property of the returned value is set as shown in the following table.

  Condition

  Returned Kind property value

  The parameter is .

  The property of is and is .

  All other date and time values and destination time zones.

  If the value of the parameter is an ambiguous local time, it is interpreted as a standard time. If the parameter is an invalid local time, this method throws an .

  If the conversion of results in a date and time value that is earlier than or later than , this method returns or , respectively.

  You can also convert to or from UTC by calling the and methods.

  Converts a time to the time in a particular time zone.

  The date and time in the destination time zone.

  The date and time to convert. The time zone to convert to.
- Method
  3.5.0.0
  System.DateTimeOffset `` ``

  When performing the conversion, the method applies any adjustment rules in effect in the time zone.

  This overload differs from the other overloads of the method by accepting a value as its first parameter. This identifies the date and time as an offset from Coordinated Universal Time (UTC) rather than as the date and time in a particular time zone. As a result, the parameter cannot represent either an ambiguous time or an invalid time.

  In converting the value to the time in the destination time zone, this method takes into account any adjustment rules in effect in the destination time zone.

  If the conversion of results in a date and time value that is earlier than or later than , this method returns or , respectively.

  Converts a time to the time in a particular time zone.

  The date and time in the destination time zone.

  The date and time to convert. The time zone to convert to.
- Method
  3.5.0.0
  System.DateTime `` `` ``

  When performing the conversion, the method applies any adjustment rules in effect in the time zone.

  The value of the property of the parameter must correspond to the parameter, as the following table shows.

  DateTime.Kind value

  sourceTimeZone value

  Method behavior

  Equals .

  Converts to the destination time zone's time.

  Does not equal .

  Throws an .

  Equals .

  Converts to the destination time zone's time.

  Does not equal .

  Throws an .

  Any.

  Converts to the destination time zone's time.

  You can also convert to or from Coordinated Universal Time (UTC) by calling the and methods.

  The property of the returned value is set as shown in the following table.

  Condition

  Returned Kind property value

  The parameter is .

  The property of is , and both and are .

  All other date and time values, source time zones, and destination time zones.

  If the value of the parameter is an ambiguous time in the source time zone, it is interpreted as a standard time. If the parameter is an invalid time in the source time zone, this method throws an .

  If the conversion of results in a date and time value that is earlier than or later than , this method returns or , respectively.

  The method throws an exception if the property of the argument is but the argument is not . To determine whether the source time zone is the local time zone or the universal time zone, the method tests for reference equality instead of testing for value equality with the method. Note that objects that represent the local time zone and that are retrieved by calling the method do not have referential equality with . Furthermore, objects that represent the local or universal time zone and that are retrieved by iterating the collection returned by the method do not have referential equality with or . As an alternative, you can call the method.

  Converts a time from one time zone to another.

  The date and time in the destination time zone that corresponds to the parameter in the source time zone.

  The date and time to convert. The time zone of . The time zone to convert to.
- Method
  3.5.0.0
  System.DateTime `` ``

  When performing the conversion, the method applies any adjustment rules in effect in the time zone.

  This overload is largely identical to calling the method, except that it allows you to specify the destination time zone by its identifier rather than by an object reference. This method is most useful when you must convert a time without retrieving the time zone object that corresponds to it and you do not need to know whether the converted time is standard or daylight saving time.

  The method determines the source time zone from the value of the parameter's property, as the following table shows.

  Kind property value

  Source time zone

  Method behavior

  Converts the local time to the time in .

  Converts Coordinated Universal Time (UTC) to the time in .

  Assumed to be .

  Converts the local time to the time in .

  The property of the returned value is set as shown in the following table.

  Condition

  Returned Kind property value

  The is TimeZoneInfo.Utc.Id.

  Any other value.

  If the value of the parameter is an ambiguous local time, it is interpreted as a standard time. If the parameter is an invalid local time, this method throws an .

  If the conversion of results in a date and time value that is earlier than or later than , this method returns or , respectively.

  This method retrieves the time zone whose identifier is specified by the parameter from the registry. It cannot retrieve a time zone object that is created using the method. The parameter must correspond exactly to the time zone's registry key in length, but not in case, for a successful match to occur; that is, the comparison of with time zone identifiers is case-insensitive.

  Converts a time to the time in another time zone based on the time zone's identifier.

  The date and time in the destination time zone.

  The date and time to convert. The identifier of the destination time zone.
- Method
  3.5.0.0
  System.DateTimeOffset `` ``

  When performing the conversion, the method applies any adjustment rules in effect in the time zone.

  This overload is identical to calling the method, except that it allows you to specify the destination time zone by its identifier rather than by an object reference. This method is most useful when you must convert a time without retrieving the time zone object that corresponds to it and you do not need to know whether the converted time is standard or daylight saving time.

  Because the parameter represents a date and time together with that time's offset from Coordinated Universal Time (UTC), it cannot represent either an ambiguous time or an invalid time.

  This method retrieves the time zone whose identifier is specified by the parameter from the registry. It cannot retrieve a time zone object that is created using the method. The parameter must correspond exactly to the time zone's registry key in length, but not in case, for a successful match to occur; that is, the comparison of with time zone identifiers is case-insensitive.

  In converting the value to the time in the destination time zone, the method takes into account any adjustment rules in effect in the destination time zone.

  If the conversion of results in a date and time value that is earlier than or later than , this method returns or , respectively.

  Converts a time to the time in another time zone based on the time zone's identifier.

  The date and time in the destination time zone.

  The date and time to convert. The identifier of the destination time zone.
- Method
  3.5.0.0
  System.DateTime `` `` ``

  When performing the conversion, the method applies any adjustment rules in effect in the time zone.

  Although it is similar to the method, you can use to specify the source and destination time zones using their identifiers instead of their objects. This method is most useful when you must convert a time without retrieving the time zone object that corresponds to it and you do not need to know whether the converted time is standard or daylight saving time.

  This method retrieves the time zones whose identifiers are the and parameters from the registry. It cannot retrieve time zone objects that are created using the method.

  The value of the property of the parameter must correspond to the parameter, as the following table shows.

  DateTime.Kind value

  sourceTimeZone value

  Method behavior

  Equals TimeZoneInfo.Utc.Id.

  Converts to the destination time zone's time.

  Does not equal TimeZoneInfo.Utc.Id.

  Throws an .

  Equals TimeZoneInfo.Local.Id.

  Converts to the destination time zone's time.

  Does not equal TimeZoneInfo.Local.Id.

  Throws an .

  Any.

  Converts to the destination time zone's time.

  Because it relies on calls to the method, the method performs a case-insensitive search to locate the time zones that correspond to and .

  If the value of the parameter is an ambiguous time in the source time zone, it is interpreted as a standard time. If the parameter is an invalid time in the source time zone, this method throws an .

  The property of the returned value is set to unless the destination time zone is Coordinated Universal Time (UTC), in which case it is set to .

  Converts a time from one time zone to another based on time zone identifiers.

  The date and time in the destination time zone that corresponds to the parameter in the source time zone.

  The date and time to convert. The identifier of the source time zone. The identifier of the destination time zone.
- Method
  3.5.0.0
  System.DateTime `` ``

  When performing the conversion, the method applies any adjustment rules in effect in the time zone.

  The precise behavior of this method depends on the value of the property of the parameter, as the following table shows.

  DateTime.Kind property

  Conversion

  Throws an .

  or

  Converts from Coordinated Universal Time (UTC).

  If the conversion of results in a date and time value that is earlier than or later than , this method returns or , respectively.

  Converts a Coordinated Universal Time (UTC) to the time in a specified time zone.

  The date and time in the destination time zone. Its property is if is ; otherwise, its property is .

  The Coordinated Universal Time (UTC). The time zone to convert to.
- Method
  3.5.0.0
  System.DateTime ``

  The exact conversion performed depends on the value of the property of the parameter, as the following table shows.

  DateTime.Kind property

  Conversion

  Converts from local time to Coordinated Universal Time (UTC).

  Assumes is local time and converts from local time to UTC.

  Returns unchanged.

  If corresponds to an ambiguous local time, this method assumes that it is standard local time. If corresponds to an invalid local time, the method throws an .

  If the current computer's local time zone includes multiple adjustment rules, this overload of the method can return results that differ from the and methods. always applies the current adjustment rule to time zone conversion, whether or not lies within its date range. And when executing on net_v35_long, also applies the current adjustment rule to time zone conversion, whether or not lies within its date range.

  If the UTC equivalent of is earlier than or later that , this method returns or , respectively.

  Converts the specified date and time to Coordinated Universal Time (UTC).

  The Coordinated Universal Time (UTC) that corresponds to the parameter. The value's property is always set to .

  The date and time to convert.
- Method
  3.5.0.0
  System.DateTime `` ``

  If the property of the parameter equals and the parameter equals , this method returns without performing any conversion.

  If corresponds to an ambiguous time, this method assumes that it is the standard time of the source time zone. If corresponds to an invalid time, this method throws an .

  If the Coordinated Universal Time (UTC) equivalent of is earlier than or later that , this method returns or , respectively.

  Converts the time in a specified time zone to Coordinated Universal Time (UTC).

  The Coordinated Universal Time (UTC) that corresponds to the parameter. The object's property is always set to .

  The date and time to convert. The time zone of .
- Method
  3.5.0.0
  System.TimeZoneInfo `` `` `` ``

  This overload of the method is suitable for creating a time zone that has no adjustments (that is, a time zone that does not support daylight saving time). To define a time zone that includes adjustments for daylight saving time, use either the or the method.

  The following table shows the relationship between the parameters that are provided to the method and the properties of the object that are returned by the method call.

  CreateCustomTimeZone parameter

  TimeZoneInfo property

  Typically, the time zone's standard time name and its identifier are the same. However, the length of the time zone's identifier should not exceed 32 characters. The string passed to the parameter follows a fairly standard format. The first portion of the display name is the time zone's base offset from Coordinated Universal Time, which is indicated by the acronym GMT (for Greenwich Mean Time), enclosed in parentheses. This is followed by a string that identifies the time zone itself, or one or more of the cities, regions, or countries in the time zone, or both. For example:

  `(GMT+02:00) Athens, Beirut, Istanbul, Minsk (GMT-02:00) Mid-Atlantic (GMT-07:00) Mountain Time (US & Canada)`

  Creates a custom time zone with a specified identifier, an offset from Coordinated Universal Time (UTC), a display name, and a standard time display name.

  The new time zone.

  The time zone's identifier. An object that represents the time difference between this time zone and Coordinated Universal Time (UTC). The display name of the new time zone. The name of the new time zone's standard time.
- Method
  3.5.0.0
  System.TimeZoneInfo `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Method
  3.5.0.0
  System.TimeZoneInfo `` `` `` `` `` `` `` To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added. To be added.
- Property
  3.5.0.0
  System.String To be added.

  The display name is localized based on the culture installed with the Windows operating system.

  A property whose value is not or null does not necessarily indicate that the time zone supports daylight saving time. To determine whether the time zone supports daylight saving time, check the value of its property.

  In most cases, the property of time zones defined in the registry is not or null. However, the property of custom time zones can be set to . This occurs when custom time zones are created by the or the overload and the parameter is true. Therefore, your code should never assume that the value of the property is not null or empty.

  The property is equivalent to the property of the class.

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

- Property
  3.5.0.0
  System.String To be added.

  The display name is localized based on the culture installed with the Windows operating system.

  Time zone display names for Windows system time zones follow a fairly standard format. The first portion of the display name is the time zone's base offset from Coordinated Universal Time, which is indicated by the acronym GMT (for Greenwich Mean Time), enclosed in parentheses. For Coordinated Universal Time, the GMT acronym with no offset is enclosed in parentheses. This is followed by a string that identifies the time zone or one or more of the cities, regions, or countries in the time zone. For example:

  `(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London (GMT+02:00) Athens, Beirut, Istanbul, Minsk (GMT-02:00) Mid-Atlantic (GMT-07:00) Mountain Time (US & Canada)`

  Gets the general display name that represents the time zone.

- Method
  3.5.0.0
  System.Boolean ``

  Equality is based on a comparison of values. Two objects are considered to be equal under the following conditions:

  The value of their property is the same.

  They have the same adjustment rules.

  returns the Boolean value that results from evaluating the following expression:

  [C#]

  other.Id == this.Id && HasSameRules(other);

  [Visual Basic]

  other.Id = me.Id AndAlso HasSameRules(other)

  If the parameter is an uninitialized object, this method returns false.

  Determines whether the current object and another object are equal.

  true if the two objects are equal; otherwise, false.

  A second object to compare with the current object.
- Method
  3.5.0.0
  System.TimeZoneInfo ``

  The parameter must correspond exactly to the time zone's registry key in length, but not in case, for a successful match to occur; that is, the comparison of with time zone identifiers is case-insensitive. If you want to retrieve time zone objects based on partial matches, you can write custom procedures that work with the read-only collection of objects returned by the method.

  tries to match to the subkey names of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones branch of the registry under Windows XP and Windows Vista. This branch does not necessarily contain a comprehensive list of time zone identifiers. If required by an application, you can create a particular time zone either by calling one of the overloads of the method or by calling to deserialize a object that represents the required time zone. However, time zones created by these method calls are not included in the registry and cannot be retrieved using the method. These custom time zones can be accessed only through the object reference returned by the or method call.

  Retrieves a object from the registry based on its identifier.

  An object whose identifier is the value of the parameter.

  The time zone identifier, which corresponds to the property.
- Method
  3.5.0.0
  System.TimeZoneInfo ``

  There is an alternative to providing all the code required to create a time zone that is not found in the registry. You can define a custom time zone and either use the method in a standalone executable or use an application's setup program to save the time zone as a string. The application can then retrieve this string from its storage location and instantiate it using the method.

  Deserializes a string to re-create an original serialized object.

  The original serialized object.

  The string representation of the serialized object.
- Method
  3.5.0.0
  System.TimeZoneInfo+AdjustmentRule[]

  The method retrieves an array of objects. Each object in the array defines the effective start and end date of that time zone adjustment, as well as its delta (the exact amount by which the adjustment causes the time to change). In addition, two properties return objects that define when each annual transition to and from standard time occurs.

  If a time zone has multiple adjustment rules, they are generally ordered from earliest (at index 0) to latest (at index – 1).

  If a time zone has no adjustment rules, the method returns an empty array (an array whose is zero).

  Any modifications to the elements of the array returned by the method are not reflected in the adjustment rules that belong to a particular time zone. To modify a time zone's adjustment rules (such as to reflect its historical transition to and from daylight saving time) you must create a new time zone with the appropriate adjustment rules, rather than modify the existing one.

  Retrieves an array of objects that apply to the current object.

  An array of objects for this time zone.

- Method
  3.5.0.0
  System.TimeSpan[] ``

  The precise behavior of this method depends on the relationship between the property and the object, as the following table shows.

  TimeZoneInfo object type

  Kind property value

  Behavior

  or

  Returns ambiguous time offsets for .

  Converts to the local time, and then returns ambiguous time offsets for that time.

  Any value.

  Throws an .

  Any other time zone.

  or

  Converts to the specified time zone, and then determines whether that time is ambiguous.

  Any other time zone.

  Determines whether is ambiguous in the specified time zone.

  The order of objects in the array returned by this method is undefined. However, you can determine which element represents an offset from the time zone's standard time by comparing its value with the time zone's property. To map an ambiguous time to a time zone's standard time, see How to: Resolve Ambiguous Times.

  Returns information about the possible dates and times that an ambiguous date and time can be mapped to.

  An array of objects that represents possible Coordinated Universal Time (UTC) offsets that a particular date and time can be mapped to.

  A date and time.
- Method
  3.5.0.0
  System.TimeSpan[] ``

  The precise behavior of this method depends on the relationship between the property of the parameter and the object. If the value of the property corresponds to the current time zone's possible offsets from Coordinated Universal Time (UTC) for that date and time, the method returns the possible offsets. Otherwise, it converts to the time in the current time zone, and then returns the possible offsets of that date and time.

  The order of objects in the array returned by this method is undefined. However, you can determine which element represents an offset from the time zone's standard time by comparing its value with the time zone's property. To map an ambiguous time to a time zone's standard time, see How to: Resolve Ambiguous Times.

  Returns information about the possible dates and times that an ambiguous date and time can be mapped to.

  An array of objects that represents possible Coordinated Universal Time (UTC) offsets that a particular date and time can be mapped to.

  A date and time.
- Method
  3.5.0.0
  System.Int32

  For additional detail about the method, see .

  Serves as a hash function for hashing algorithms and data structures such as hash tables.

  A 32-bit signed integer that serves as the hash code for this object.

- Method
  3.5.0.0
  System.Void `` `` To be added. To be added. To be added. To be added.
- Method
  3.5.0.0
  System.Collections.ObjectModel.ReadOnlyCollection<System.TimeZoneInfo>

  The method retrieves all available time zone information from the subkeys of the registry's HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones key. If it is unable to successfully retrieve and parse values for particular string properties of individual objects, this method sets their value to an empty string ("").

  The method returns a collection of objects only for time zones defined in the registry. It does not include time zones created using the overloads of the method. These are accessible only through the object reference returned by the time zone creation method.

  The collection returned by this method is sorted by display name using the current culture. For information about the display name, see .

  The object returned by this method supports the interface, which means that it can be iterated using the foreach (in C#) or For Each…Next (in Visual Basic) statements. Each iteration of the loop provides the next object in the collection.

  The collection of objects represents time zones defined on the local computer; it does not necessarily provide complete information for all time zones during all time periods. If your application requires time zones not found on the local computer, you can create custom time zones using the overloads of the method. For more information, see How to: Create Time Zones without Adjustment Rules and How to: Create Time Zones with Adjustment Rules.

  You can also determine whether an individual time zone is defined on the local computer by calling the method and providing the identifier of the time zone you want to retrieve as a parameter.

  Returns a sorted collection of all the time zones about which information is available on the local system.

  A read-only collection of objects.

- Method
  3.5.0.0
  System.TimeSpan ``

  The returned time span includes any differences due to the application of adjustment rules to the current time zone. It differs from the property, which returns the difference between Coordinated Universal Time (UTC) and the time zone's standard time and, therefore, does not take adjustment rules into account.

  If the parameter's property does not correspond to the time zone object, this method performs the necessary conversion before returning a result. For example, this can occur if the property is but the time zone object is not the local time zone. If is ambiguous, or if the converted time is ambiguous, this method interprets the ambiguous time as a standard time. If is invalid, this method returns a object that reflects the difference between UTC and the time zone's standard time.

  The method is similar in operation to the method of the class.

  Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.

  An object that indicates the time difference between the two time zones.

  The date and time to determine the offset for.
- Method
  3.5.0.0
  System.TimeSpan ``

  The returned time span includes any differences due to the application of adjustment rules to the current time zone. It differs from the property, which returns the difference between Coordinated Universal Time (UTC) and the time zone's standard time and, therefore, does not take adjustment rules into account.

  Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.

  An object that indicates the time difference between Coordinated Universal Time (UTC) and the current time zone.

  The date and time to determine the offset for.
- Method
  3.5.0.0
  System.Boolean ``

  Like the method, the method indicates whether two time zones have the same base offset (as defined by the property) and the same adjustment rules. Unlike the method, does not compare time zone identifiers (as defined by the property).

  Indicates whether the current object and another object have the same adjustment rules.

  true if the two time zones have identical adjustment rules and an identical base offset; otherwise, false.

  A second object to compare with the current object.
- Property
  3.5.0.0
  System.String To be added.

  The time zone identifier is a key string that uniquely identifies a particular time zone. In Windows XP and Windows Vista, it corresponds to the subkeys of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zone branch of the registry. It can be passed as a parameter to the method to retrieve a particular time zone from the registry.

  If you are defining a custom time zone, you should not assign it an identifier longer than 32 characters because this is the maximum length supported by the Windows registry.

  The value of the property is usually, but not always, identical to that of the property. The identifier of the Coordinated Universal Time zone is UTC.

  Gets the time zone identifier.

- Method
  3.5.0.0
  System.Boolean ``

  An ambiguous time falls within a range of times for the current time zone. This means it can be either a standard time or a time that results from the application of an adjustment rule. Typically, ambiguous times result when the clock is set to return to standard time from daylight saving time. See the Example section for an illustration.

  Coordinated Universal Time (UTC) has no ambiguous times; neither do time zones that do not support daylight saving time. Therefore, these time zones have no adjustment rules and calls to the method always return false.

  For time zones that do observe daylight saving time, the precise behavior of this method depends on the relationship between the property and the object, as the following table shows.

  TimeZoneInfo object type

  Kind property value

  Behavior

  or

  Determines whether the parameter is ambiguous.

  Converts to the local time and then determines whether that time is ambiguous.

  or

  Returns false.

  If is ambiguous, assumes it is a standard time, converts it to UTC, and returns false.

  Any other time zone.

  or

  Converts to the time in the specified time zone and then determines whether that time is ambiguous.

  Any other time zone.

  Determines whether is ambiguous.

  Determines whether a particular date and time in a particular time zone is ambiguous and can be mapped to two or more Coordinated Universal Time (UTC) times.

  true if the parameter is ambiguous; otherwise, false.

  A date and time value.
- Method
  3.5.0.0
  System.Boolean ``

  An ambiguous time falls within a range of times for the current time zone. This means that it can be either a standard time or a time that results from the application of an adjustment rule. Typically, ambiguous times result when the clock is set to return to standard time from daylight saving time. Coordinated Universal Time (UTC) has no ambiguous times; neither do time zones that do not support daylight saving time.

  The precise behavior of the method depends on the relationship between the property of the parameter and the current time zone. If the value of the property is a possible offset from the UTC of the current time zone, the method determines whether that date and time is ambiguous. Otherwise, it converts to the time in the current time zone, and then determines whether that date and time is ambiguous.

  Determines whether a particular date and time in a particular time zone is ambiguous and can be mapped to two or more Coordinated Universal Time (UTC) times.

  true if the parameter is ambiguous in the current time zone; otherwise, false.

  A date and time.
- Method
  3.5.0.0
  System.Boolean ``

  The return value of is affected by the relationship between the time zone represented by the object and the property of the parameter, as the following table shows.

  TimeZoneInfo object

  DateTime.Kind property

  Result

  DateTimeKind.Local

  Determines whether is daylight saving time.

  DateTimeKind.Utc

  Converts from Coordinated Universal Time (UTC) to local time and determines whether it is daylight saving time.

  DateTimeKind.Unspecified

  Assumes that represents local time and determines whether it is daylight saving time.

  DateTimeKind.Local, DateTimeKind.Unspecified, or DateTimeKind.Utc

  Returns false (UTC does not support daylight saving time).

  Any other object.

  DateTimeKind.Local

  Converts the local time to the equivalent time of the object and then determines whether the latter is daylight saving time.

  Any other object.

  DateTimeKind.Utc

  Converts UTC to the equivalent time of the object and then determines whether the latter is daylight saving time.

  Any other object.

  DateTimeKind.Unspecified

  Determines whether is daylight saving time.

  If the time zone represented by the object does not support daylight saving time, the method always returns false. A number of time zones, including , do not observe daylight saving time.

  If the parameter specifies an ambiguous time in the current object's time zone, the method interprets as standard time and returns false if its property is or . If the property is , this method will select the correct ambiguous time and indicate whether it is a daylight saving time.

  Because the method can return false for a date and time that is ambiguous (that is, a date and time that can represent either a standard time or a daylight saving time in a particular time zone), the method can be paired with the method to determine whether a time may be a daylight saving time. Because an ambiguous time is one that can be both a daylight saving time and a standard time, the method can be called first to determine whether a date and time may be a daylight saving time. If the method returns false, the method can be called to determine whether the value is a daylight saving time. The following example illustrates this technique.

  code reference: System.TimeZone2.IsDaylightSavingTime#2

  If the parameter specifies an invalid time, the method call throws an if the value of the parameter's property is ; otherwise, the method returns false.

  Call the method to determine whether to use a time zone's value or its value when displaying the time zone name. See the Example section for an illustration.

  Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current object.

  true if the parameter is a daylight saving time; otherwise, false.

  A date and time value.
- Method
  3.5.0.0
  System.Boolean ``

  The return value of is affected by the relationship between the time zone represented by the object and the property of the parameter. If does not correspond to the current time zone's offset from Coordinated Universal Time (UTC), the method converts that time to the time in the current time zone. It then determines whether that date and time is a daylight saving time.

  If the time zone represented by the object does not support daylight saving time, the method always returns false.

  Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current object.

  true if the parameter is a daylight saving time; otherwise, false.

  A date and time value.
- Method
  3.5.0.0
  System.Boolean ``

  An invalid time falls within a range of times for the current time zone that cannot be mapped to Coordinated Universal Time (UTC) due to the application of an adjustment rule. Typically, invalid times occur when the time moves ahead for daylight saving time. See the Example section for an illustration.

  The value of the property of the parameter affects whether represents an invalid time, as the following table shows.

  DateTime.Kind property

  TimeZoneInfo object (if applicable)

  Behavior

  Determines whether the time is invalid.

  or a non-local time zone.

  Converts to the time of the object and returns false.

  Not applicable.

  Assumes is the time of the object and determines whether it is invalid.

  Not applicable.

  Returns false.

  Indicates whether a particular date and time is invalid.

  true if is invalid; otherwise, false.

  A date and time value.
- Property
  3.5.0.0
  System.TimeZoneInfo To be added.

  The local time zone is the time zone on the computer where the code is executing.

  You should always access the local time zone through the property rather than assigning the local time zone to a object variable. This prevents the object variable from being invalidated by a call to the method.

  The object returned by the property reflects the setting of the Automatically adjust clock for daylight saving changes checkbox or the Automatically adjust clock for Daylight Saving Time checkbox in the Control Panel Date and Time application for Windows XP and Windows Vista, respectively. If the checkbox is unchecked, the cached copy of the local time zone contains no daylight saving time information. This means that:

  The local time zone's method returns an array whose length is zero.

  The local time zone's property returns false.

  The local time zone has no ambiguous or invalid times (all calls to or return false).

  All calls to with individual local times return false.

  This is not true, however, if a reference to the local time zone is retrieved using the method.

  The property corresponds to the property of the class.

  Gets a object that represents the local time zone.

- Method
  3.5.0.0
  System.Void `` To be added. To be added. To be added.
- Property
  3.5.0.0
  System.String To be added.

  The display name is localized based on the culture installed with the Windows operating system.

  The property is identical to the property of the class.

  The value of the property is usually, but not always, identical to that of the property.

  Gets the display name for the time zone's standard time.

- Property
  3.5.0.0
  System.Boolean To be added.

  The value of the property for the local time zone returned by the property reflects the setting of the Control Panel Date and Time application's checkbox that defines whether the system automatically adjusts for daylight saving time. If it is unchecked, or if no checkbox is displayed for a time zone, the value of this property is false.

  Gets a value indicating whether the time zone has any daylight saving time rules.

- Property
  3.5.0.0
  System.String To be added. To be added. To be added.
- Method
  3.5.0.0
  System.String

  Applications that rely on time zones that are not typically defined in the registry of Windows systems can use the method to instantiate the necessary time zones as objects. The application can then call the method to convert the time zone object to a string.

  The object should also be stored in a location where the application can retrieve it when needed. Possible locations include:

  The registry.

  An application resource file.

  An external file, such as a text file.

  Converts the current object to a serialized string.

  A string that represents the current object.

- Method
  3.5.0.0
  System.String

  When assigning a collection that contains objects to a list control such as the control, the control automatically calls the method to extract a string that describes each object to be represented in the list. As a result, you do not need to store a meaningful description of the object as a string, and the user does not need to use that string to extract the object from the collection. See How to: Enumerate Time Zones Present on a Computer for more detail.

  Returns the current object's display name.

  The value of the property of the current object.

- Property
  3.5.0.0
  System.TimeZoneInfo To be added.

  This is a built-in object; information about this object is not retrieved from the registry.

  You should always access the Coordinated Universal Time (UTC) zone through the property rather than assigning the UTC time zone to a object variable. This prevents the object variable from being invalidated by a call to the method.

  Coordinated Universal Time was previously known as Greenwich Mean Time (GMT).

  Gets a object that represents the Coordinated Universal Time (UTC) zone.