diff options
-rw-r--r-- | src/org/traccar/protocol/Gps103ProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/Gps103ProtocolDecoderTest.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java index 2e3620179..9646a5e6c 100644 --- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java @@ -126,7 +126,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder { int deltaMinutes = (localHours - utcHours) * 60 + localMinutes - utcMinutes; if (deltaMinutes <= -12 * 60) { deltaMinutes += 24 * 60; - } else if (deltaMinutes > 12) { + } else if (deltaMinutes > 12 * 60) { deltaMinutes -= 24 * 60; } time.add(Calendar.MINUTE, -deltaMinutes); diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java index 2e3929b28..923d92b31 100644 --- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java @@ -82,6 +82,9 @@ public class Gps103ProtocolDecoderTest { assertNotNull(decoder.decode(null, null, "imei:863070010423167,tracker,1211060621,,F,062152.000,A,2220.6914,N,11407.5506,E,15.85,347.84,")); + + assertNotNull(decoder.decode(null, null, + "imei:863070012698733,tracker,1303092334,,F,193427.000,A,5139.0369,N,03907.2791,E,0.00,,")); } } |