FIX oppdater med lokale endringer

This commit is contained in:
Frode Carlsen
2019-08-08 08:53:20 +02:00
committed by GitHub
parent 98eeeda561
commit 010a93096b

View File

@@ -311,6 +311,10 @@ public class CronExpression {
return nextTimeAfter(afterTime, afterTime.plusYears(4)); return nextTimeAfter(afterTime, afterTime.plusYears(4));
} }
public LocalDateTime neste(LocalDateTime forrige) {
return nextTimeAfter(ZonedDateTime.of(forrige, ZoneId.systemDefault())).toLocalDateTime();
}
public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, long durationInMillis) { public ZonedDateTime nextTimeAfter(ZonedDateTime afterTime, long durationInMillis) {
// will search for the next time within the next durationInMillis // will search for the next time within the next durationInMillis
// millisecond. Be aware that the duration is specified in millis, // millisecond. Be aware that the duration is specified in millis,