ZeTime: Fix calendar event time and date (still barely usable, since only one event is sent, plus sunrise and sunset)

This commit is contained in:
Andreas Shimokawa 2020-05-05 16:23:43 +02:00
parent 9d3c49309f
commit 7517bffe9c
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@
* ZeTime: Support rejecting calls
* ZeTime: Try to fix weather conditions on newer firmwares
* ZeTime: Fix could not synchronize calendar on connect
* ZeTime: Fix calendar event time and date (still barely usable, since only one event is sent, plus sunrise and sunset)
* Allow set light/dark theme according to system settings (new default)
#### Version 0.43.3

View File

@ -550,7 +550,7 @@ public class ZeTimeDeviceSupport extends AbstractBTLEDeviceSupport {
public void onAddCalendarEvent(CalendarEventSpec calendarEventSpec) {
Calendar time = GregorianCalendar.getInstance();
byte[] CalendarEvent = new byte[calendarEventSpec.title.getBytes(StandardCharsets.UTF_8).length + 16]; // 26 bytes for calendar and overhead
time.setTimeInMillis(calendarEventSpec.timestamp);
time.setTimeInMillis(calendarEventSpec.timestamp * 1000L);
CalendarEvent[0] = ZeTimeConstants.CMD_PREAMBLE;
CalendarEvent[1] = ZeTimeConstants.CMD_PUSH_CALENDAR_DAY;
CalendarEvent[2] = ZeTimeConstants.CMD_SEND;