aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index fef3e2f5b..a0ff5a0b8 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -16,6 +16,7 @@
package org.traccar.protocol;
import java.util.Calendar;
+import java.util.Properties;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
@@ -35,6 +36,14 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
public Gt06ProtocolDecoder(ServerManager serverManager) {
super(serverManager);
+
+ if (serverManager != null) {
+ Properties p = getServerManager().getProperties();
+ if (p.contains("gt06.timezone")) {
+ timeZone.setRawOffset(
+ Integer.valueOf(p.getProperty("gt06.timezone")) * 1000);
+ }
+ }
}
private String readImei(ChannelBuffer buf) {