Creates a time zone with identifier, an offset from Coordinated Universal Time (UTC), a display name, and a standard time display name.
Module Example
Public Sub Main()
Dim displayName As String = "(GMT+06:00) Antarctica/Mawson Time"
Dim standardName As String = "Standard Time"
Dim offset As TimeSpan = New TimeSpan(06, 00, 00)
Dim mawson As TimeZoneInfo = TimeZoneInfo.CreateCustomTimeZone(standardName, offset, displayName, standardName)
Console.WriteLine("The current time is {0} {1}", _
TimeZoneInfo.ConvertTime(Date.Now, TimeZoneInfo.Local, mawson), _
mawson.StandardName)
End Sub
End Module
Related examples in the same category