Fix build on Windows 10
@@ -29,6 +29,7 @@ import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Locale;
+import java.util.TimeZone;
import static org.junit.Assert.*;
import org.junit.Test;
@@ -307,7 +308,9 @@ public class CronTabTest {
CronTabList tabs = CronTabList.create("TZ=Australia/Sydney\nH * * * *\nH * * * *", Hash.from("seed"));
List<Integer> times = new ArrayList<Integer>();
for (int i = 0; i < 60; i++) {
- if (tabs.check(new GregorianCalendar(2013, 3, 3, 11, i, 0))) {
+ GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("Australia/Sydney"));
+ calendar.set(2013, Calendar.APRIL, 3, 11, i, 0);
+ if (tabs.check(calendar)) {
times.add(i);
}
}
