diff options
Diffstat (limited to 'src/org/traccar/protocol/StarLinkProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/StarLinkProtocolDecoder.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/org/traccar/protocol/StarLinkProtocolDecoder.java index 46d8ee9cc..baa2cf823 100644 --- a/src/org/traccar/protocol/StarLinkProtocolDecoder.java +++ b/src/org/traccar/protocol/StarLinkProtocolDecoder.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.CellTower; @@ -78,17 +77,11 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_TYPE, parser.nextInt()); position.set(Position.KEY_INDEX, parser.nextInt()); - DateBuilder dateBuilder = new DateBuilder() - .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt()) - .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt()); - position.setDeviceTime(dateBuilder.getDate()); + position.setDeviceTime(parser.nextDateTime()); position.set(Position.KEY_EVENT, parser.nextInt()); - dateBuilder = new DateBuilder() - .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt()) - .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt()); - position.setFixTime(dateBuilder.getDate()); + position.setFixTime(parser.nextDateTime()); position.setValid(true); position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN)); |