JodaTime - how can I know whether a daylight saving occurs within a specified period of time?

前端 未结 3 592
感情败类
感情败类 2021-01-13 23:35

I need to know whether the period defined by:

DateTime start;
DateTime end;

has a DST inside.

I am iterating over collection of per

3条回答
  •  既然无缘
    2021-01-14 00:16

    As long as start and end are in the correct time zone (e.g., created using this constructor) then the Interval created using them should take DST for that time zone into account. If the Duration of that Interval is not equal to 24 hours, then you've crossed the DST point.

提交回复
热议问题