aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GoSafeProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/GoSafeProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GoSafeProtocolDecoder.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
index 96f745917..a2a5edbd2 100644
--- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java
+++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
@@ -43,8 +43,8 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
.text("*GS") // header
.number("d+,") // protocol version
.number("(d+),") // imei
- .number("(dd)(dd)(dd)") // time
- .number("(dd)(dd)(dd),") // date
+ .number("(dd)(dd)(dd)") // time (hhmmss)
+ .number("(dd)(dd)(dd),") // date (ddmmyy)
.expression("(.*)#?") // data
.compile();
@@ -242,10 +242,7 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
Date time = null;
if (parser.hasNext(6)) {
- DateBuilder dateBuilder = new DateBuilder()
- .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt())
- .setDateReverse(parser.nextInt(), parser.nextInt(), parser.nextInt());
- time = dateBuilder.getDate();
+ time = parser.nextDateTime(Parser.DateTimeFormat.HMS_DMY2);
}
List<Position> positions = new LinkedList<>();