1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

Support timezones with half an our offset (like UTC+5:30)

Should help #2283
This commit is contained in:
Andreas Shimokawa 2021-06-04 13:05:53 +02:00
parent 6526268804
commit f32c4d6a43

View File

@ -230,8 +230,8 @@ public class BLETypeConversions {
if (false && timezoneFlags == TZ_FLAG_INCLUDE_DST_IN_TZ) {
offsetMillis += timeZone.getDSTSavings();
}
int utcOffsetInHours = (offsetMillis / (1000 * 60 * 60));
return (byte) (utcOffsetInHours * 4);
int utcOffsetInQuarterHours = (offsetMillis / (1000 * 60 * 15));
return (byte) utcOffsetInQuarterHours;
}
/**