TimeZone.GetDaylightChanges returns the daylight saving time period for a particular year. : TimeZone « Date Time « VB.Net






TimeZone.GetDaylightChanges returns the daylight saving time period for a particular year.

 

Imports System
Imports System.Globalization
Imports Microsoft.VisualBasic

Module DaylightChangesDemo
    Dim localZone As TimeZone = TimeZone.CurrentTimeZone

    Sub CreateDaylightTime( year As Integer )
        
        Dim daylight As DaylightTime = localZone.GetDaylightChanges( year )

        Console.WriteLine( "{0,-7}{1,-20:yyyy-MM-dd HH:mm}" & _
            "{2,-20:yyyy-MM-dd HH:mm}{3}", year, daylight.Start, daylight.End, daylight.Delta )
    End Sub 

    Sub Main( )
        Console.WriteLine( localZone.StandardName )

        CreateDaylightTime( 2005 )
    End Sub 
End Module 

   
  








Related examples in the same category

1.TimeZone.GetUtcOffset Method returns the Coordinated Universal Time (UTC) offset for the specified local time.
2.TimeZone.GetUtcOffset returns the Coordinated Universal Time (UTC) offset for the specified local time.
3.TimeZone.IsDaylightSavingTime
4.TimeZone.ToLocalTime returns the local time that corresponds to a specified date and time value.