aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-09-26 22:11:17 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-09-26 22:11:17 +1200
commit0070e2750587d3ef27f823b37b35d2582a79394c (patch)
tree6205f38e53552de1efd2068be45e33bae2f31421
parentaf90749859e9f3363b98866de88b91d4fd91693e (diff)
downloadtrackermap-server-0070e2750587d3ef27f823b37b35d2582a79394c.tar.gz
trackermap-server-0070e2750587d3ef27f823b37b35d2582a79394c.tar.bz2
trackermap-server-0070e2750587d3ef27f823b37b35d2582a79394c.zip
Fix timezone parameter (fix #881)
-rw-r--r--default.cfg1
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java4
2 files changed, 3 insertions, 2 deletions
diff --git a/default.cfg b/default.cfg
index 504655fe1..b67c7d50e 100644
--- a/default.cfg
+++ b/default.cfg
@@ -165,6 +165,7 @@
<!-- GT06 server configuration -->
<entry key='gt06.enable'>true</entry>
<entry key='gt06.port'>5023</entry>
+ <entry key='gt06.timezone'>7200</entry>
<!-- Megastek server configuration -->
<entry key='megastek.enable'>true</entry>
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index a0ff5a0b8..4b9aaedf3 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -39,7 +39,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
if (serverManager != null) {
Properties p = getServerManager().getProperties();
- if (p.contains("gt06.timezone")) {
+ if (p.containsKey("gt06.timezone")) {
timeZone.setRawOffset(
Integer.valueOf(p.getProperty("gt06.timezone")) * 1000);
}
@@ -130,7 +130,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
}
- else if (deviceId != null && (
+ else if (/*deviceId != null && */(
type == MSG_GPS ||
type == MSG_GPS_LBS ||
type == MSG_GPS_LBS_STATUS ||