Etar-Calendar
Etar-Calendar copied to clipboard
Event changes to the day before on edit
When I edit an event, I noticed the date is changed to the day before. I always have to remember to set the right date again before saving any change. How to reproduce it:
- Click on an event on the calendar
- Click the pencil icon to edit it At this point, in the Edit screen, the date is set to the day before. Let's say the event date was 05/25. When the edit screen opens it is set to 05/24. I'm using v. 1.0.30 on Android 11
I've also experienced this frequently with the latest version of etar and android 11
Strange, can't reproduce this with my phone but it's only android 10. @jspricke Can you reproduce this?
Can't reproduce on Android 12
I have a very reproducible, very similar issue, looks like #1173. Is it possible it's a timezone issue or something? Is there any debugging info I can provide?
I'm on grapheneos/android 12, etar 1.0.30 from f-droid
Edit: If it matters, my timezone is currently UTC-7(PDT)
I can confirm it is a timezone issue, but the results are a little misleading (I didn't inspect the code much). I tested with an all day event for the 18th of August with different time zones. Here are the results.
Created the event (all the same)
Begin 18th august - End 18th August
Viewing the event
Negative time zone: Begin 18th august - End 19th August
Positive time zone: Begin 17th august - End 18th August
Zero time zone: Begin 18th august - End 18th August
Editing the event
Negative time zone: Begin 18th august - End 19th August
Positive time zone: Begin 18th august - End 19th August
Zero time zone: Begin 18th august - End 18th August
As you can see the only case in which the event stays correct both viewing and editing is with a UTC time zone, the event looks as lasting 2 days if viewing in both plus and minus time zones, but with different offset. Editing the event causes the end to move for both in the same direction (saving without modifying makes the event last one more day). Besides the untriggered modification mentioned above, in all cases changing the event from all-day to normal increases the end by a further day (e.g. 19th if UTC and 20th August otherwise)
Extended AOSP 12, etar 1.0.30 fdroid
Is there any hope that this might get fixed since it seems the underlying issue is known? Etar seems to be one of the few if not the only calendar that has colored event support on non google accounts (e.g. through davx5) so it would be a shame to give that up.
Unfortunately I'm not entirely sure the underlying issue is known. I'm running another android version (AICP 17.1, android 12.1) and it seems it's fixed for my time zone. Curiously enough if i put negative time zones, events are going backwards (still one day but the previous, in contrast with what I previously observed). Again I'm giving a free guess: perhaps the app is relying on some undefined behaviour of the library and different implementations work differently, as you can see, all we know is that it's a complex issue. Unfortunately I have no time to check the code and make sure of this..
Ah, I assumed the timezone stuff was for sure the cause. For what its worth, I grabbed the previous version 1.0.29 from f-droid and it doesn't have this problem on my end. This is on Moto G200 5G and Android 12. Sadly I don't have the ability to test specific commits to be sure where it happened but all the Android 12 Time API changes in PR #1047 does seem like a good candidate.
It this is only about all-day events, then probably fixed by GH-1405. Let me know.