aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjon-stumpf <jon.stumpf@gmail.com>2017-03-16 23:45:40 -0400
committerjon-stumpf <jon.stumpf@gmail.com>2017-03-17 13:48:21 -0400
commite5d29490af8e0d7f95519ffd93867ff2a0fc861e (patch)
treea81cb51d8b55cc545a3b215b65b1a39f7b1324a4
parent001ee6acf3052fd99970e75a7f55b11332b9442f (diff)
downloadtraccar-server-e5d29490af8e0d7f95519ffd93867ff2a0fc861e.tar.gz
traccar-server-e5d29490af8e0d7f95519ffd93867ff2a0fc861e.tar.bz2
traccar-server-e5d29490af8e0d7f95519ffd93867ff2a0fc861e.zip
Reverted changes to StarLinkProtocolDecoder.java to avoid merge conflict;
-rw-r--r--src/org/traccar/protocol/StarLinkProtocolDecoder.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/StarLinkProtocolDecoder.java b/src/org/traccar/protocol/StarLinkProtocolDecoder.java
index baa2cf823..46d8ee9cc 100644
--- a/src/org/traccar/protocol/StarLinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/StarLinkProtocolDecoder.java
@@ -18,6 +18,7 @@ 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;
@@ -77,11 +78,17 @@ public class StarLinkProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_TYPE, parser.nextInt());
position.set(Position.KEY_INDEX, parser.nextInt());
- position.setDeviceTime(parser.nextDateTime());
+ DateBuilder dateBuilder = new DateBuilder()
+ .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setDeviceTime(dateBuilder.getDate());
position.set(Position.KEY_EVENT, parser.nextInt());
- position.setFixTime(parser.nextDateTime());
+ dateBuilder = new DateBuilder()
+ .setDate(parser.nextInt(), parser.nextInt(), parser.nextInt())
+ .setTime(parser.nextInt(), parser.nextInt(), parser.nextInt());
+ position.setFixTime(dateBuilder.getDate());
position.setValid(true);
position.setLatitude(parser.nextCoordinate(Parser.CoordinateFormat.HEM_DEG_MIN));