1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-29 10:03:46 +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
This commit is contained in:
Andreas Shimokawa 2017-11-05 22:35:28 +01:00
parent 24f98504b0
commit a58e3f66ce

View File

@ -147,6 +147,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) {