NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DateTime.ToLocalTime

Converts UTC to local time.

[Visual Basic]
Public Function ToLocalTime() As DateTime
[C#]
public DateTime ToLocalTime();
[C++]
public: DateTime ToLocalTime();
[JScript]
public function ToLocalTime() : DateTime;

Return Value

A new DateTime obtained by calculating the difference between UTC and local time and adding the result to or subtracting it from the current DateTime.

Remarks

ToLocalTime calculates the difference between the local time and UTC and adds the result to or subtracts it from the current DateTime.

The ToLocalTime method creates a DateTime that is the user's local time zone by using the coordinated universal time (UTC) offset (see GetUTCOffset).

Note   The local time is the UTC plus the offset.

See Also

DateTime Structure | DateTime Members | System Namespace | TimeZone | System.DirectoryServices.IADsPropertyValue.UTCTime