aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 12187e1ed..1d81bb351 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -33,6 +33,7 @@ import java.util.TimeZone;
public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
private Long deviceId;
+ private boolean forceTimeZone = false;
private final TimeZone timeZone = TimeZone.getTimeZone("UTC");
public Gt06ProtocolDecoder(DataManager dataManager, String protocol, Properties properties) {
@@ -40,6 +41,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
if (properties != null) {
if (properties.containsKey(protocol + ".timezone")) {
+ forceTimeZone = true;
timeZone.setRawOffset(
Integer.valueOf(properties.getProperty(protocol + ".timezone")) * 1000);
}
@@ -120,7 +122,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
if ((extensionBits & 0x8) != 0) {
offset = -offset;
}
- timeZone.setRawOffset(offset);
+ if (!forceTimeZone) {
+ timeZone.setRawOffset(offset);
+ }
}
try {