Browse Source
Merge pull request #39 from kytmanov/master
repeated execution task fix
master
Ruben Bermudez
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/main/java/org/telegram/services/TimerExecutor.java
|
|
|
@ -83,7 +83,7 @@ public class TimerExecutor { |
|
|
|
private long computNextDilay(int targetHour, int targetMin, int targetSec) { |
|
|
|
final LocalDateTime localNow = LocalDateTime.now(Clock.systemUTC()); |
|
|
|
LocalDateTime localNextTarget = localNow.withHour(targetHour).withMinute(targetMin).withSecond(targetSec); |
|
|
|
while (localNow.compareTo(localNextTarget) > 0) { |
|
|
|
while (localNow.compareTo(localNextTarget.minusSeconds(1)) > 0) { |
|
|
|
localNextTarget = localNextTarget.plusDays(1); |
|
|
|
} |
|
|
|
|
|
|
|
|