Converts the current date and time to Coordinated Universal Time (UTC).
Module Example
Public Sub Main()
Dim datNowLocal As Date = Date.Now
Console.WriteLine("Converting {0}, Kind {1}:", datNowLocal, datNowLocal.Kind)
Console.WriteLine(" ConvertTimeToUtc: {0}, Kind {1}", TimeZoneInfo.ConvertTimeToUtc(datNowLocal), TimeZoneInfo.ConvertTimeToUtc(datNowLocal).Kind)
End Sub
End Module
Related examples in the same category