我需要知道定义的时期是否:
DateTime start;
DateTime end;
里面有一个DST.
我正在迭代{start,end}定义的句点集合,并在每次迭代中向前移动24小时.结果期间从午夜开始,到下午午夜前1毫秒结束.我发现如果周期内有一个夏令时点,那么移位会产生不正确的结果,例如:
有:
Duration targetDuration = new Duration(24*60*60*1000L-1);
DateTime start = new DateTime("2012-03-10T00:00:00.000-08:00");
DateTime end = new DateTime("2012-03-10T23:59:59.999-08:00");
然后转移完成:
start = end.plusMillis(1);
end = start.plus(targetDuration);
生产:
start = "2012-03-11T00:00:00.000-08:00"
end = "2012-03-12T00:59:59.999-07:00"
我想知道JodaTime中是否有任何标准API可以检查一段时间内是否有DST?