Mega Code Archive

 
Categories / VB.Net / Date Time
 

TimeZoneInfo BaseUtcOffset gets the time difference between the current time zones standard time and Coordinated Universal Time

Imports System Imports Microsoft.VisualBasic Module UTCTimeDemo     Sub Main( )         Dim localZone As TimeZoneInfo = TimeZoneInfo.Local         Console.WriteLine("The {0} time zone is {1}:{2} {3} than Coordinated Universal Time.", _                            localZone.StandardName, _                           Math.Abs(localZone.BaseUtcOffset.Hours), _                           Math.Abs(localZone.BaseUtcOffset.Minutes), _                           IIf(localZone.BaseUtcOffset >= TimeSpan.Zero, "later", "earlier"))     End Sub  End Module