views:

61

answers:

3

Is there a way in VB.Net to determine if the timezone the current system has daylight savings time in effect? Of course I can get the offset from GMT using the "z"/"zz" formatting option, but that doesn't tell me if DST is in effect for the current timezone or if the current timezone is in standard time...or if DST/Standard time aren't even an issue in the timezone for the system. Does that make sense?

+4  A: 

TimeZoneInfo.IsDaylightSavingTime Method

Floyd Pink
+1 Exactly what I was about to post
Tahbaza
Hmmm, I couldn't get this to work...I'm using VS 2008. I did get the following to work though: TimeZoneInfo.Local.DaylightName
GregH
+1  A: 

You can use for dateinstance:

DateTimeInstance.IsDaylightSavingTime()
Nakul Chaudhary
A: 

I'm sure the answers provided would work...I just couldn't figure out how to get them working however. There is no "IsDaylightSavingTime" method available to me. I ended up using:

   TimeZoneInfo.Local.DaylightName
GregH