mirror of
https://github.com/frode-carlsen/cron.git
synced 2025-12-06 05:50:54 +03:00
Specify the timezone for the tests
If we don't specify the timezone, the DST tests will fail for those who're not lucky enough to live close to Frode Carlsen.
This commit is contained in:
@@ -21,18 +21,24 @@ import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import fc.cron.CronExpression;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
import org.joda.time.Hours;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import fc.cron.CronExpression.CronFieldType;
|
||||
import fc.cron.CronExpression.DayOfMonthField;
|
||||
import fc.cron.CronExpression.DayOfWeekField;
|
||||
import fc.cron.CronExpression.SimpleField;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Hours;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.junit.Test;
|
||||
|
||||
public class CronExpressionTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
DateTimeZone myZone = DateTimeZone.forID("Europe/Oslo");
|
||||
DateTimeZone.setDefault(myZone);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shall_parse_number() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user