aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java4
-rw-r--r--src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java
index 9b672cacc..2ca71a1ae 100644
--- a/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2021 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -63,7 +63,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
.or()
.text("F,")
.groupBegin()
- .number("(dd)(dd)(dd).d+") // time utc (hhmmss)
+ .number("(dd)(dd)(dd)(?:.d+)?") // time utc (hhmmss)
.or()
.number("(?:d{1,5}.d+)?")
.groupEnd()
diff --git a/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java
index 63a6e06d0..f22b3801c 100644
--- a/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/Gps103ProtocolDecoderTest.java
@@ -12,6 +12,9 @@ public class Gps103ProtocolDecoderTest extends ProtocolTest {
Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(null);
verifyPosition(decoder, text(
+ "imei:864035050002451,tracker,201223064947,,F,064947,A,1935.70640,N,09859.94436,W,0.025,;"));
+
+ verifyPosition(decoder, text(
"imei:760112011448012,001,2001151918,,F,191833.000,A,6136.6174,N,2126.9901,E,0.00,202.6,-0.1,1,,,,20;"));
verifyAttribute(decoder, text(