diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-09-20 10:13:44 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-09-20 10:13:44 +1200 |
commit | c0ca959ad982fa30f70f14a6deed011dadd628c2 (patch) | |
tree | 0c1152dc092026124b67047af19915bb26f29d5c /src/org/traccar/protocol | |
parent | 3c3596868b8a18a6c207e902a6568c8e850e7696 (diff) | |
download | trackermap-server-c0ca959ad982fa30f70f14a6deed011dadd628c2.tar.gz trackermap-server-c0ca959ad982fa30f70f14a6deed011dadd628c2.tar.bz2 trackermap-server-c0ca959ad982fa30f70f14a6deed011dadd628c2.zip |
Add GT06 time correction (fix #881)
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 9 |
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) { |