Skip to content

Commit 732f5a1

Browse files
author
Gerald Unterrainer
committed
Merge branch 'master' into develop
2 parents a50ebb9 + 8b741f0 commit 732f5a1

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ name: Bump version
33
on:
44
push:
55
branches:
6-
- '**'
6+
- master
77
pull_request:
88
jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@master
13+
with:
14+
fetch-depth: '0'
1315
- name: Bump version and push tag
1416
uses: anothrNick/github-tag-action@master
1517
env:

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ deploy:
4747
- provider: releases
4848
skip_cleanup: true
4949
overwrite: true
50-
api_key:
51-
secure: $GITHUB_API_KEY
50+
api_key: $GITHUB_API_KEY
5251
file: $ARTIFACT_ID.$POM_VERSION.zip
5352
on:
5453
tags: true

src/main/java/info/unterrainer/commons/crontabscheduler/CrontabScheduler.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package info.unterrainer.commons.crontabscheduler;
22

3-
import java.time.ZoneId;
43
import java.time.ZonedDateTime;
54
import java.util.ArrayList;
65
import java.util.Collection;
@@ -19,8 +18,6 @@
1918
@Slf4j
2019
public class CrontabScheduler {
2120

22-
public static final ZoneId LOCAL_ZONE = ZoneId.of("Europe/Vienna");
23-
2421
protected ScheduledExecutorService executor;
2522
protected Map<String, BasicCrontabHandler> registeredHandlers = new HashMap<>();
2623

@@ -50,7 +47,7 @@ public synchronized void setHandlers(final Collection<BasicCrontabHandler> handl
5047
* @param handlers the handlers to set or use to replace the old ones
5148
*/
5249
public synchronized void setHandlers(final Map<String, BasicCrontabHandler> handlers) {
53-
ZonedDateTime now = ZonedDateTime.now(LOCAL_ZONE);
50+
ZonedDateTime now = ZonedDateTime.now();
5451
if (handlers == null)
5552
throw new NullPointerException("Specify a valid collection of handlers.");
5653

@@ -113,7 +110,7 @@ public CrontabScheduler(final long period, final TimeUnit timeUnit, final Consum
113110
}
114111

115112
private synchronized void pollAndAdvanceHandlers(final Map<String, BasicCrontabHandler> handlers) {
116-
pollAndAdvanceHandlers(ZonedDateTime.now(LOCAL_ZONE), handlers);
113+
pollAndAdvanceHandlers(ZonedDateTime.now(), handlers);
117114
}
118115

119116
private synchronized void pollAndAdvanceHandlers(final ZonedDateTime now,

0 commit comments

Comments
 (0)