Commit 847d0f3f authored by Kjetil Thuen's avatar Kjetil Thuen

Avoid using Calendar to prevent time zone issues.

Fixes #2093 (I hope)
parent 1b461967
......@@ -6,7 +6,6 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.Calendar;
import java.util.Date;
import org.junit.Before;
......@@ -81,9 +80,6 @@ public class ETagTest {
}
private Date createDate() throws Exception {
Calendar calendar = Calendar.getInstance();
calendar.set(2013, 9, 10, 13, 14, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
return new Date(1381403640000L); //August 10th, 2013 13:14:00 CEST
}
}
......@@ -4,7 +4,6 @@ import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import java.util.Calendar;
import java.util.Date;
import javax.servlet.FilterChain;
......@@ -37,9 +36,6 @@ public class EntityTagFilterTest {
}
Date createDate() throws Exception {
Calendar calendar = Calendar.getInstance();
calendar.set(2013, 9, 10, 13, 14, 0);
calendar.set(Calendar.MILLISECOND, 0);
return calendar.getTime();
return new Date(1381403640000L); //August 10th, 2013 13:14:00 CEST
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment