1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-16 02:14:04 +02:00

try to parse timezone that comes back from huami devices

(there are other places where something like this has to be done, probably also in the other direction)

related to #869

(cherry picked from commit a58e3f66ce)
This commit is contained in:
Andreas Shimokawa 2017-11-05 22:35:28 +01:00 committed by cpfeiffer
parent 6b56e8e568
commit 9764e8e54e

View File

@ -144,6 +144,12 @@ public class BLETypeConversions {
value[6] & 0xff
);
if (value.length > 7) {
TimeZone timeZone = TimeZone.getDefault();
timeZone.setRawOffset(value[7] * 15 * 60 * 1000);
timestamp.setTimeZone(timeZone);
}
if (honorDeviceTimeOffset) {
int offsetInHours = MiBandCoordinator.getDeviceTimeOffsetHours();
if (offsetInHours != 0) {