diff options
Diffstat (limited to 'src/org/traccar/protocol/ManPowerProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/ManPowerProtocolDecoder.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/ManPowerProtocolDecoder.java b/src/org/traccar/protocol/ManPowerProtocolDecoder.java index 39b651d7e..08cb8b818 100644 --- a/src/org/traccar/protocol/ManPowerProtocolDecoder.java +++ b/src/org/traccar/protocol/ManPowerProtocolDecoder.java @@ -18,7 +18,6 @@ package org.traccar.protocol; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; -import org.traccar.helper.DateBuilder; import org.traccar.helper.Parser; import org.traccar.helper.PatternBuilder; import org.traccar.model.Position; @@ -38,8 +37,8 @@ public class ManPowerProtocolDecoder extends BaseProtocolDecoder { .expression("[^,]*,[^,]*,") .expression("([^,]*),") // status .number("d+,d+,d+.?d*,") - .number("(dd)(dd)(dd)") // date - .number("(dd)(dd)(dd),") // time + .number("(dd)(dd)(dd)") // date (yymmdd) + .number("(dd)(dd)(dd),") // time (hhmmss) .expression("([AV]),") // validity .number("(dd)(dd.dddd),") // latitude .expression("([NS]),") @@ -69,10 +68,7 @@ public class ManPowerProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_STATUS, parser.next()); - 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()); position.setValid(parser.next().equals("A")); position.setLatitude(parser.nextCoordinate()); |