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;
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.
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.
DateTime Structure | DateTime Members | System Namespace | TimeZone | System.DirectoryServices.IADsPropertyValue.UTCTime