Report time as DST if it is either ambiguous or DST : TimeZoneInfo « Date Time « VB.Net






Report time as DST if it is either ambiguous or DST

 
Module Example
    Public Sub Main()
        Dim unclearDate As Date = #11/4/2010 1:30AM#

        If TimeZoneInfo.Local.IsAmbiguousTime(unclearDate) OrElse _ 
           TimeZoneInfo.Local.IsDaylightSavingTime(unclearDate) Then
            Console.WriteLine("{0} may be daylight saving time in {1}.", _ 
                              unclearDate, TimeZoneInfo.Local.DisplayName)                                           
        End If
        
    End Sub

End Module

   
  








Related examples in the same category

1.TimeZoneInfo.BaseUtcOffset gets the time difference between the current time zone's standard time and Coordinated Universal Time (UTC).
2.TimeZoneInfo.ConvertTime converts a time to the time in a particular time zone.
3.TimeZoneInfo.ConvertTimeToUtc
4.TimeZoneInfo.FindSystemTimeZoneById("Tokyo Standard Time")
5.TimeZoneInfo.DaylightName
6.TimeZoneInfo.DisplayName
7.TimeZoneInfo.Equals
8.TimeZoneInfo.IsDaylightSavingTime
9.Gets a TimeZoneInfo object that represents the local time zone.
10.Gets a TimeZoneInfo object that represents the Coordinated Universal Time (UTC) zone.
11.Display the names for standard time and daylight saving time for the local time zone
12.Display the current date and time and show if they occur in daylight saving time
13.Get the current Coordinated Universal Time (UTC) and UTC offset.
14.Display the daylight saving time range for the current year
15.Convert a time from one time zone to another.
16.Converts a time to the time in a particular time zone.
17.Converts a time from one time zone to another based on time zone identifiers.
18.Eastern Standard Time
19.GMT Standard Time
20.Russian Standard Time
21.India Standard Time
22.China Standard Time
23.Tokyo Standard Time
24.Converts a Coordinated Universal Time (UTC) to the time in a specified time zone.
25.Converts the current date and time to Coordinated Universal Time (UTC).
26.Converts the time in a specified time zone to Coordinated Universal Time (UTC).
27.Creates a time zone with identifier, an offset from Coordinated Universal Time (UTC), a display name, and a standard time display name.
28.Gets the time zone identifier.
29.whether a date and time is ambiguous and can be mapped to two or more Coordinated Universal Time (UTC) times.
30.Gets a value indicating whether the time zone has any daylight saving time rules.