mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 12:56:49 +01:00
[Huawei] Fix TimeZone offset calculation
This commit is contained in:
parent
f0a9ab7f98
commit
84070dd0ba
@ -51,7 +51,7 @@ public class HuaweiUtil {
|
||||
byte[] id = now.getTimeZone().getID().getBytes();
|
||||
return ByteBuffer.allocate(6 + id.length)
|
||||
.putInt((int)(now.getTimeInMillis() / 1000))
|
||||
.put((byte)(zoneRawOffset < 0 ? (zoneRawOffset / 3600 + 128) : zoneRawOffset / 3600) )
|
||||
.put((byte)(zoneRawOffset < 0 ? (-zoneRawOffset / 3600 + 128) : zoneRawOffset / 3600) )
|
||||
.put((byte)(zoneRawOffset / 60 % 60))
|
||||
.put(id)
|
||||
.array();
|
||||
|
Loading…
Reference in New Issue
Block a user