diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-23 23:09:27 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-23 23:09:27 +1200 |
commit | 8f0c648c6997dc0c83eef536293b40ba112873fa (patch) | |
tree | b9d633779a0390bf184f7b5f724e60b8d6a85999 /src | |
parent | 34e2554f43e621c3432abc9f53fffd82061c30ce (diff) | |
download | traccar-server-8f0c648c6997dc0c83eef536293b40ba112873fa.tar.gz traccar-server-8f0c648c6997dc0c83eef536293b40ba112873fa.tar.bz2 traccar-server-8f0c648c6997dc0c83eef536293b40ba112873fa.zip |
Fix GT06 timezone decoding
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index e94a7238b..5196634e8 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -116,7 +116,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { // Timezone offset if (dataLength > 10) { int extensionBits = buf.readUnsignedShort(); - int offset = (extensionBits >> 4) * 36000; + int hours = (extensionBits >> 4) / 100; + int minutes = (extensionBits >> 4) % 100; + int offset = (hours * 60 + minutes) * 60; if ((extensionBits & 0x8) != 0) { offset = -offset; } |