Converts the time in a specified time zone to Coordinated Universal Time (UTC).
Module Example
Public Sub Main()
Dim thisTime As Date = Date.Now
Console.WriteLine("Time in {0} zone: {1}", IIf(TimeZoneInfo.Local.IsDaylightSavingTime(thisTime), _
TimeZoneInfo.Local.DaylightName, TimeZoneInfo.Local.StandardName), thisTime)
Console.WriteLine(" UTC Time: {0}", TimeZoneInfo.ConvertTimeToUtc(thisTime, TimeZoneInfo.Local))
End Sub
End Module
Related examples in the same category