diff options
Diffstat (limited to 'test/org/traccar/ProtocolTest.java')
-rw-r--r-- | test/org/traccar/ProtocolTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java index 756393288..93f3150c7 100644 --- a/test/org/traccar/ProtocolTest.java +++ b/test/org/traccar/ProtocolTest.java @@ -135,7 +135,9 @@ public class ProtocolTest extends BaseTest { if (expected != null) { if (expected.getFixTime() != null) { - Assert.assertEquals("time", expected.getFixTime(), position.getFixTime()); + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + Assert.assertEquals("time", dateFormat.format(expected.getFixTime()), dateFormat.format(position.getFixTime())); } Assert.assertEquals("valid", expected.getValid(), position.getValid()); Assert.assertEquals("latitude", expected.getLatitude(), position.getLatitude(), 0.00001); |