List of usage examples for org.joda.time DateTimeZone isLocalDateTimeGap
public boolean isLocalDateTimeGap(LocalDateTime localDateTime)
From source file:com.battlelancer.seriesguide.util.TimeTools.java
License:Apache License
/** * Handles DST gap (typically a missing clock hour when DST is getting enabled) by moving the * time forward in hour increments until the local date time is outside the gap. *//*from ww w. j a v a 2 s. c om*/ private static LocalDateTime handleDstGap(DateTimeZone showTimeZone, LocalDateTime localDateTime) { while (showTimeZone.isLocalDateTimeGap(localDateTime)) { // move time forward in 1 hour increments, until outside of the gap localDateTime = localDateTime.plusHours(1); } return localDateTime; }