TimeZone.IsDaylightSavingTime : TimeZone « System « VB.Net by API






TimeZone.IsDaylightSavingTime

  

Public Class Tester
    Public Shared Sub Main
        Dim theZone As TimeZone = TimeZone.CurrentTimeZone
        Dim result As New System.Text.StringBuilder

        result.Append("DaylightName: ").AppendLine( _
           theZone.DaylightName)
        result.Append("StandardName: ").AppendLine( _
           theZone.StandardName)
        result.Append("IsDaylightSavingTime(Now): ").AppendLine( _
           theZone.IsDaylightSavingTime(Now))
        result.Append("GetUtcOffset(Now): ").AppendLine( _
           theZone.GetUtcOffset(Now).ToString())
        result.Append("System time is Local Time: ")
        result.AppendLine(Now.Kind = DateTimeKind.Local)
        result.Append("System time is Universal Coordinated Time: ")
        result.AppendLine(Now.Kind = DateTimeKind.Utc)
        result.Append("System time is Unspecified: ")
        result.AppendLine(Now.Kind = DateTimeKind.Unspecified)

        Console.WriteLine(result.ToString())

    End Sub

End Class

   
    
  








Related examples in the same category

1.TimeZone.DaylightName
2.TimeZone.GetUtcOffset