Export (0) Print
Expand All

DateTime.ToLocalTime Method

.NET Micro Framework 3.0
Converts the current value of the current DateTime object to local time.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

public DateTime ToLocalTime ()

Return Value

A new DateTime object with the local-time equivalent of the current value of the current DateTime object.

The value of the new DateTime object is MaxValue field if the converted value is too large to be represented by a DateTime object, or it is a MinValue field if the converted value is too small to be represented by a DateTime object.

The local time is equal to the Coordinated Universal Time (UTC) time plus the UTC offset. For more information about the UTC offset, see the GetUtcOffset method. The conversion also takes into account the daylight saving time rule that applies to the current value of the current DateTime object.

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, 4.1, and 4.2.

Community Additions

ADD
Show:
© 2014 Microsoft