Get the next date/time at which a daylight savings time transition occurs

后端 未结 3 948
孤街浪徒
孤街浪徒 2021-01-17 14:46

I would like to write (or use if it already exits) a function in C# that returns the date/time of the next DST transition given a System.TimeZoneInfo object and a particular

3条回答
  •  心在旅途
    2021-01-17 15:24

    System.TimeZoneInfo.TransitionTime looks like a structure that can hold such time transition data, not a function that figures out the actual values. To create such a function, I would find the data online somewhere, then create values using the static CreateFloatingDateRule or CreateFixedDateRule methods.

提交回复
热议问题