I want to know the exact time when DST starts/ends in a particular timezone and year.
Using TimeZoneInfo.GetAdjust开发者_JAVA技巧mentRules
and AdjustmentRule.DaylightTransitionStart
I can get a TransitionTime
object which specifies the DST start moment rule.
Let's assume that I find the adjustment rule that applies for 2010. How do I convert it's TransitionTime
object to a DateTime
in 2010?
Timezone: (UTC-05:00) Eastern Time (US & Canada)
Valid: 01.01.2007 00:00:00 - 31.12.9999 00:00:00
DST Start TransitionTime:
IsFixedDateRule: false
Month: 3
Week: 2
DayOfWeek: Sunday
TimeOfDay: 02:00:00
MSDN has the sample. See DisplayTransitionInfo
function at the bottom.
精彩评论