From 7f6280f725100d446405d5f92ca8bd9435d621f4 Mon Sep 17 00:00:00 2001 From: jon-stumpf Date: Fri, 17 Mar 2017 18:46:17 -0400 Subject: Removed capture of milliseconds for UTC time in Gps103 protocol; Determined one test position in Gps103ProtocolDecoderTest.java has only 2 digits where 3 digits are needed for milliseconds; --- src/org/traccar/protocol/Gps103ProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 5d402c09d..49f1a2049 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -43,7 +43,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { .expression("([^,]+)?,") // rfid .expression("[FL],") // full / low .groupBegin() - .number("(dd)(dd)(dd).(d+)") // time utc (hhmmss.sss) + .number("(dd)(dd)(dd).d+") // time utc (hhmmss) .or() .number("(?:d{1,5}.d+)?") .groupEnd() @@ -263,7 +263,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { String utcHours = parser.next(); String utcMinutes = parser.next(); - dateBuilder.setTime(localHours, localMinutes, parser.nextInt(), parser.nextInt()); + dateBuilder.setTime(localHours, localMinutes, parser.nextInt()); // Timezone calculation if (utcHours != null && utcMinutes != null) { -- cgit v1.2.3