mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-23 18:36:50 +01:00
Pebble: Correct setting the timezone on firmware 3.x (pebble expects the "ID" eg. Europe/Berlin)
This commit is contained in:
parent
62c196eb1d
commit
18726eca33
@ -4,6 +4,7 @@
|
||||
* Pebble: Store app details in pbw-cache and display them in app manager on firmware 3.x
|
||||
* Pebble: Increase maximum notification body length from 255 to 512 bytes on firmware 3.x
|
||||
* Pebble: Support installing .pbl (language files) on firmware 3.x
|
||||
* Pebble: Correct setting the timezone on firmware 3.x (pebble expects the "ID" eg. Europe/Berlin)
|
||||
|
||||
####Version 0.6.8
|
||||
* Mi Band support for Firmware upgrade/downgrade on Mi Band 1A (white LEDs, no heartrate sensor)
|
||||
|
@ -439,8 +439,8 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
long ts_offset = (SimpleTimeZone.getDefault().getOffset(ts));
|
||||
ByteBuffer buf;
|
||||
if (isFw3x) {
|
||||
String timezone = SimpleTimeZone.getDefault().getDisplayName(false, SimpleTimeZone.SHORT);
|
||||
short length = (short) (LENGTH_SETTIME + timezone.length() + 3);
|
||||
String timezone = SimpleTimeZone.getDefault().getID();
|
||||
short length = (short) (LENGTH_SETTIME + timezone.getBytes().length + 3);
|
||||
buf = ByteBuffer.allocate(LENGTH_PREFIX + length);
|
||||
buf.order(ByteOrder.BIG_ENDIAN);
|
||||
buf.putShort(length);
|
||||
@ -448,7 +448,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
buf.put(TIME_SETTIME_UTC);
|
||||
buf.putInt((int) (ts / 1000));
|
||||
buf.putShort((short) (ts_offset / 60000));
|
||||
buf.put((byte) timezone.length());
|
||||
buf.put((byte) timezone.getBytes().length);
|
||||
buf.put(timezone.getBytes());
|
||||
LOG.info(timezone);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user