mvmike / min-cal-widget

Minimal calendar widget
BSD 3-Clause "New" or "Revised" License
89 stars 15 forks source link

timezone correction not used #29

Closed 532910 closed 9 months ago

532910 commented 5 years ago

when i have a record in a calendar before 3am the dot is shown a day before i'm in msk which is gmt+3

mvmike commented 5 years ago

Should be corrected in #28, could you please try with the latest release?

Will need to add some tests for those cases in the app, though... there isn't any now :sweat_smile:

532910 commented 5 years ago

Not fixed in v1.0.0.

mvmike commented 5 years ago

Not able to reproduce it :disappointed:. Could you please provide the following information?

532910 commented 5 years ago
  • Device clock timezone System -> Date & time -> Select time zone: GMT +03:00 Moscow Standard Time

  • Event's calendar timezone Moscow Standard Time GMT+3

  • Exact start and end time for the event 2018-11-15 01:00 --- 2018-11-15 02:00

532910 commented 5 years ago

event widget

mvmike commented 5 years ago

Could you please reopen it? It seems that "all day" event instances are in UTC but those that are not are in system time zone :upside_down_face:

532910 commented 5 years ago

only you can reopen it

mvmike commented 5 years ago

right :sweat_smile:

mvmike commented 5 years ago

corrected in v.1.0.1

532910 commented 5 years ago

Thank you!

aereaux commented 9 months ago

It looks like I'm still getting an issue similar to this (although I'm in a negative timezone and so the event appears on the day after). Should I open another issue?

mvmike commented 9 months ago

Hi @aereaux,

Could you please provide more information to try to reproduce the issue? I think it should be enough with the data about the event that leaks to the wrong day and system timezone.

aereaux commented 9 months ago

My timezone is currently PST (UTC -8). To reproduce I created an event with timezone GMT (UTC -0) and a time of 03:00 Sunday Jan 21 2024. This event appears in Etar in the proper time on the 20th in my timezone but on the 21st in min-cal. If it helps I can try and share an ICS file or provide any other system settings needed for debugging.

Thanks!

mvmike commented 9 months ago

Hi @aereaux,

Did a bit of testing, both in code and in the emulator and could not reproduce the issue

Widget Instance System time zone
Screenshot_20240102_112037 Screenshot_20240102_112104 Screenshot_20240102_112129

May I suggest that you clear the storage and cache of the "Calendar Storage" system app? It happened to me once or twice that it was showing outdated data through the Calendar API. If the issue still persists, I'd be very helpful to get an ICS with the exact event details 🙏🏻

Edit: the calendar storage does not delete any online calendar data, it's just the local storage, deleting its data makes the system sync calendars again

aereaux commented 9 months ago

I think you're seeing the same thing that I'm seeing, the event appears on the 21st when it's on the 20th in my local timezone. Is that expected behavior?

mvmike commented 9 months ago

Now I see what you mean... Currently, events are shown in a specific day if that event is inside the day in its own timezone, but looking at how all calendars behave, it should definitely work as you mentioned and consider the system time zone (the issue is hard to spot if your calendar/instances are in the same timezone as your device, which is my case).

Appreciate a lot the report, @aereaux!

aereaux commented 9 months ago

Thanks! Yeah, I only noticed it because of an ICS file that gets imported in my timezone on the phone vs in UTC when synced from caldav.

mvmike commented 9 months ago

Fixed in 3ce92398edb634ef176cbdcea68fffb8c524c38e, which is included in v2.16.0