diff options
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index 5e527dd9c..06c3985dc 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -15,10 +15,12 @@ */ package org.traccar.protocol; +import java.net.SocketAddress; +import java.util.Calendar; +import java.util.TimeZone; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelHandlerContext; import org.traccar.BaseProtocolDecoder; import org.traccar.Context; import org.traccar.helper.Crc; @@ -26,11 +28,6 @@ import org.traccar.helper.UnitsConverter; import org.traccar.model.Event; import org.traccar.model.Position; -import java.net.SocketAddress; -import java.util.Calendar; -import java.util.Properties; -import java.util.TimeZone; - public class Gt06ProtocolDecoder extends BaseProtocolDecoder { private boolean forceTimeZone = false; @@ -38,11 +35,10 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { public Gt06ProtocolDecoder(Gt06Protocol protocol) { super(protocol); - - Properties properties = Context.getProps(); - if (properties != null && properties.containsKey(protocol + ".timezone")) { + + if (Context.getConfig().hasKey(protocol + ".timezone")) { forceTimeZone = true; - timeZone.setRawOffset(Integer.valueOf(properties.getProperty(protocol + ".timezone")) * 1000); + timeZone.setRawOffset(Context.getConfig().getInteger(protocol + ".timezone") * 1000); } } |