aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MeitrackProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/MeitrackProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/MeitrackProtocolDecoder.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
index a4a0d2d42..e97e44dac 100644
--- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
@@ -20,7 +20,6 @@ import org.jboss.netty.channel.Channel;
import org.traccar.BaseProtocolDecoder;
import org.traccar.Context;
import org.traccar.DeviceSession;
-import org.traccar.helper.DateBuilder;
import org.traccar.helper.Parser;
import org.traccar.helper.PatternBuilder;
import org.traccar.helper.UnitsConverter;
@@ -51,7 +50,7 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
.number("(-?d+.d+),") // latitude
.number("(-?d+.d+),") // longitude
.number("(dd)(dd)(dd)") // date (ddmmyy)
- .number("(dd)(dd)(dd),") // time
+ .number("(dd)(dd)(dd),") // time (hhmmss)
.number("([AV]),") // validity
.number("(d+),") // satellites
.number("(d+),") // rssi
@@ -107,10 +106,7 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
position.setLatitude(parser.nextDouble());
position.setLongitude(parser.nextDouble());
- DateBuilder dateBuilder = new DateBuilder()
- .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt())
- .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
- position.setTime(dateBuilder.getDate());
+ position.setTime(parser.nextDateTime(Parser.DateTimeFormat.Y2MD_HMS));
position.setValid(parser.next().equals("A"));