aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-01-04 02:50:44 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-01-04 01:50:44 +1300
commit771dad06ea52f473654bebc8c419060665e5f55d (patch)
tree90216a0c07a2a8e8354c63b07eed0df3ace2a83c
parentb579253139b5a2a21c9daafa411e78b6c4a5a852 (diff)
downloadtrackermap-server-771dad06ea52f473654bebc8c419060665e5f55d.tar.gz
trackermap-server-771dad06ea52f473654bebc8c419060665e5f55d.tar.bz2
trackermap-server-771dad06ea52f473654bebc8c419060665e5f55d.zip
Response Smokey with correct time
-rw-r--r--src/org/traccar/protocol/SmokeyProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/SmokeyProtocolDecoder.java b/src/org/traccar/protocol/SmokeyProtocolDecoder.java
index 856c62018..bcae089fb 100644
--- a/src/org/traccar/protocol/SmokeyProtocolDecoder.java
+++ b/src/org/traccar/protocol/SmokeyProtocolDecoder.java
@@ -18,6 +18,8 @@ package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
+import org.joda.time.DateTime;
+import org.joda.time.Seconds;
import org.traccar.BaseProtocolDecoder;
import org.traccar.DeviceSession;
import org.traccar.helper.DateBuilder;
@@ -47,7 +49,8 @@ public class SmokeyProtocolDecoder extends BaseProtocolDecoder {
response.writeByte(3); // protocol version
response.writeByte(MSG_DATE_RECORD_ACK);
response.writeBytes(id);
- response.writeInt(0); // timestamp
+ response.writeInt(
+ Seconds.secondsBetween(new DateTime(2000, 1, 1, 0, 0), new DateTime()).getSeconds());
response.writeByte(index);
response.writeByte(report - 0x200);