aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-07-07 15:18:24 +0500
committerAbyss777 <abyss@fox5.ru>2016-07-07 15:18:24 +0500
commite4b3214b83606cb6a0aff71d9b2951910c14f4ed (patch)
tree2071d8f2643eec34f07504ca2b326a1796f64752 /src
parent77aa77eab91127267d0d3d134acf21e456ecd072 (diff)
downloadtraccar-server-e4b3214b83606cb6a0aff71d9b2951910c14f4ed.tar.gz
traccar-server-e4b3214b83606cb6a0aff71d9b2951910c14f4ed.tar.bz2
traccar-server-e4b3214b83606cb6a0aff71d9b2951910c14f4ed.zip
Increment time in archive points
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/GranitProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/GranitProtocolDecoder.java b/src/org/traccar/protocol/GranitProtocolDecoder.java
index 3e2553927..9e618efa9 100644
--- a/src/org/traccar/protocol/GranitProtocolDecoder.java
+++ b/src/org/traccar/protocol/GranitProtocolDecoder.java
@@ -192,12 +192,13 @@ public class GranitProtocolDecoder extends BaseProtocolDecoder {
while (nblocks > 0) {
nblocks--;
long unixTime = buf.readUnsignedInt();
+ int timeIncrement = buf.getUnsignedShort(buf.readerIndex() + 120);
for (int i = 0; i < 6; i++) {
if (buf.getUnsignedByte(buf.readerIndex()) != 0xFE) {
Position position = new Position();
position.setProtocol(getProtocolName());
position.setDeviceId(getDeviceId());
- position.setTime(new Date(unixTime * 1000));
+ position.setTime(new Date((unixTime + i * timeIncrement) * 1000));
decodeStructure(buf, position);
positions.add(position);
} else {