Export (0) Print
Expand All

TimeZoneInfo Methods

The TimeZoneInfo type exposes the following members.

  Name Description
Public method Static member ClearCachedData Clears cached time zone data.
Public method Static member ConvertTime(DateTime, TimeZoneInfo) Converts a time to the time in a particular time zone.
Public method Static member ConvertTime(DateTimeOffset, TimeZoneInfo) Converts a time to the time in a particular time zone.
Public method Static member ConvertTime(DateTime, TimeZoneInfo, TimeZoneInfo) Converts a time from one time zone to another.
Public method Static member ConvertTimeBySystemTimeZoneId(DateTime, String) Converts a time to the time in another time zone based on the time zone's identifier.
Public method Static member ConvertTimeBySystemTimeZoneId(DateTimeOffset, String) Converts a time to the time in another time zone based on the time zone's identifier.
Public method Static member ConvertTimeBySystemTimeZoneId(DateTime, String, String) Converts a time from one time zone to another based on time zone identifiers.
Public method Static member ConvertTimeFromUtc Converts a Coordinated Universal Time (UTC) to the time in a specified time zone.
Public method Static member ConvertTimeToUtc(DateTime) Converts the specified date and time to Coordinated Universal Time (UTC).
Public method Static member ConvertTimeToUtc(DateTime, TimeZoneInfo) Converts the time in a specified time zone to Coordinated Universal Time (UTC).
Public method Static member CreateCustomTimeZone(String, TimeSpan, String, String) 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.
Public method Static member CreateCustomTimeZone(String, TimeSpan, String, String, String, TimeZoneInfo.AdjustmentRule[]) Creates a custom time zone with a specified identifier, an offset from Coordinated Universal Time (UTC), a display name, a standard time name, a daylight saving time name, and daylight saving time rules.
Public method Static member CreateCustomTimeZone(String, TimeSpan, String, String, String, TimeZoneInfo.AdjustmentRule[], Boolean) Creates a custom time zone with a specified identifier, an offset from Coordinated Universal Time (UTC), a display name, a standard time name, a daylight saving time name, daylight saving time rules, and a value that indicates whether the returned object reflects daylight saving time information.
Public method Equals(Object) Determines whether the current TimeZoneInfo object and another object are equal. (Overrides Object.Equals(Object).)

In .NET Framework Client Profile 4, this member is inherited from Object.Equals(Object).


In Portable Class Library Portable Class Library, this member is inherited from Object.Equals(Object).


In .NET for Windows Store apps Windows 8, this member is inherited from Object.Equals(Object).


In .NET for Windows Phone apps Windows Phone 8.1, this member is inherited from Object.Equals(Object).
Public method Equals(TimeZoneInfo) Determines whether the current TimeZoneInfo object and another TimeZoneInfo object are equal.
Public method Static member FindSystemTimeZoneById Retrieves a TimeZoneInfo object from the registry based on its identifier.
Public method Static member FromSerializedString Deserializes a string to re-create an original serialized TimeZoneInfo object.
Public method GetAdjustmentRules Retrieves an array of TimeZoneInfo.AdjustmentRule objects that apply to the current TimeZoneInfo object.
Public method GetAmbiguousTimeOffsets(DateTime) Returns information about the possible dates and times that an ambiguous date and time can be mapped to.
Public method GetAmbiguousTimeOffsets(DateTimeOffset) Returns information about the possible dates and times that an ambiguous date and time can be mapped to.
Public method GetHashCode Serves as a hash function for hashing algorithms and data structures such as hash tables. (Overrides Object.GetHashCode().)
Public method Static member GetSystemTimeZones Returns a sorted collection of all the time zones about which information is available on the local system.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetUtcOffset(DateTime) Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.
Public method GetUtcOffset(DateTimeOffset) Calculates the offset or difference between the time in this time zone and Coordinated Universal Time (UTC) for a particular date and time.
Public method HasSameRules Indicates whether the current object and another TimeZoneInfo object have the same adjustment rules.
Public method IsAmbiguousTime(DateTime) 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.
Public method IsAmbiguousTime(DateTimeOffset) 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.
Public method IsDaylightSavingTime(DateTime) Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current TimeZoneInfo object.
Public method IsDaylightSavingTime(DateTimeOffset) Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current TimeZoneInfo object.
Public method IsInvalidTime Indicates whether a particular date and time is invalid.
Public method ToSerializedString Converts the current TimeZoneInfo object to a serialized string.
Public method ToString Returns the current TimeZoneInfo object's display name. (Overrides Object.ToString().)
Top

  Name Description
Explicit interface implemetation Private method IDeserializationCallback.OnDeserialization Infrastructure. Runs when the deserialization of an object has been completed.
Explicit interface implemetation Private method ISerializable.GetObjectData Infrastructure. Populates a SerializationInfo object with the data needed to serialize the current TimeZoneInfo object.
Top
Show:
© 2014 Microsoft