fixing time zone in DateFormat for test so that there is no dependency on the executing computer's time zone setting

This commit is contained in:
Axel Uhl
2013-03-01 12:49:45 -08:00
parent f058b2e51d
commit 10c027565c
2 changed files with 2 additions and 2 deletions
@@ -7,6 +7,7 @@ import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.TimeZone;
import com.sap.sailing.domain.base.impl.MillisecondsTimePoint;
import com.sap.sailing.domain.common.ManeuverType;
@@ -24,6 +25,7 @@ public abstract class AbstractManeuverDetectionTestCase extends OnlineTracTracBa
public AbstractManeuverDetectionTestCase() throws MalformedURLException, URISyntaxException {
super();
dateFormat = new SimpleDateFormat("MM/dd/yyyy-HH:mm:ss");
dateFormat.setTimeZone(TimeZone.getTimeZone("GMT+2")); // will result in CEST
}
/**
@@ -6,7 +6,6 @@ import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.GregorianCalendar;
@@ -44,7 +43,6 @@ public class ManeuverAnalysis505Test extends AbstractManeuverDetectionTestCase {
getTrackedRace().recordWind(
new WindImpl(/* position */null, MillisecondsTimePoint.now(), new KnotSpeedWithBearingImpl(12,
new DegreeBearingImpl(65))), new WindSourceImpl(WindSourceType.WEB));
dateFormat = new SimpleDateFormat("MM/dd/yyyy-HH:mm:ss");
}
/**