BangleApps/apps/agenda
thomas bcf88c31f1 fix(agenda): all day event offsets, locale display
Currently, allDay events are off by one day for negative timezones. Per
the CalendarContract:

    If allDay is set to 1 eventTimezone must be "UTC" and the time must
    correspond to a midnight boundary.

For example, in GMT-2:00, an all day event on December 2nd (beginning at
00:00:00) will be wrongly displayed as starting on December 1st, since
the locale will determine that the event's start time is actually
22:00:00 on Dec 1.

Source:

https://developer.android.com/reference/android/provider/CalendarContract.Events.html

This commit:

* Corrects the offset back to UTC 00:00:00 for allDay events

* Fixes the conditional for single-day all day events in showEvent()

* Fixes the display of formatDateShort() for some English locales by
  also removing any trailing commas or whitespace when the year is
  removed
2024-12-16 17:30:34 -05:00
..
ChangeLog fix(agenda): all day event offsets, locale display 2024-12-16 17:30:34 -05:00
README.md agenda: added troubleshooting guidelines to the README 2022-10-14 09:41:27 +02:00
agenda-icon.js Changed calendar format to array and graying out old events 2022-06-05 18:55:55 +02:00
agenda.clkinfo.js agenda: added color field and updating clkinfo periodically (running events) 2023-01-20 15:00:45 +01:00
agenda.js fix(agenda): all day event offsets, locale display 2024-12-16 17:30:34 -05:00
agenda.png Changed calendar format to array and graying out old events 2022-06-05 18:55:55 +02:00
metadata.json fix(agenda): all day event offsets, locale display 2024-12-16 17:30:34 -05:00
screenshot_agenda_event1.png Added screenshots and correct version number 2022-06-05 18:55:55 +02:00
screenshot_agenda_event2.png Added screenshots and correct version number 2022-06-05 18:55:55 +02:00
screenshot_agenda_overview.png Added screenshots and correct version number 2022-06-05 18:55:55 +02:00
settings.js Setting to use "Today" and "Yesterday" instead of dates 2023-01-04 14:41:32 +01:00

README.md

Agenda

Basic agenda reading the events synchronised from GadgetBridge.

Functionalities

  • List all events in the next week (or whatever is synchronized)
  • Optionally view past events (until GB removes them)
  • Show start time and location of the events in the list
  • Show the colour of the calendar in the list
  • Display description, location and calendar name after tapping on events

Troubleshooting

For the events sync to work, GadgetBridge needs to have the calendar permission and calendar sync should be enabled in the devices settings (gear sign in GB, also check the blacklisted calendars there, if events are missing).
Keep in mind that GadgetBridge won't synchronize all events on your calendar, just the ones in a time window of 7 days (you don't want your watch to explode), ideally every day old events get deleted since they appear out of such window.

Force Sync

If for any reason events still cannot sync or some are missing, you can try any of the following (just one, you normally don't need to do this):

  1. from GB open the burger menu (side), tap debug and set time.
  2. from the bangle, open settings > apps > agenda > Force calendar sync, then select not to delete the local events (this is equivalent to option 1).
  3. do like option 2 but delete events, GB will synchronize a fresh database instead of patching the old one (good in case you somehow cannot get rid of older events)

After any of the options, you may need to disconnect/force close Gadgetbridge before reconnecting and let it sync (give it some time for that too), restart the agenda app on the bangle after a while to see the changes.

Report a bug

You can easily open an issue in the espruino repo, but I won't be notified and it might take time.
If you want a (hopefully) quicker response, just report on my fork.