Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Why aren't standard time and daylight savings time different now, in August?

$
0
0

My Windows 7 system is on daylight savings time.  That is, it displays daylight savings time (the same value as the cable box and all of the clocks in my house which I set ahead in March) and DateTime.Now returns the same value that it displays.  So why does this code return the same value twice?

MsgBox(DateTime.Now.ToString("u"))
        Dim est As TimeZoneInfo = Nothing
        Try
            est = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")
        Catch ex As Exception
            MsgBox(ex.ToString)

        End Try

        MsgBox(TimeZoneInfo.ConvertTime(DateTime.Now, est).ToString("u"))

Thanks,  Bob


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>