TechbeeAT / jtxBoard

jtx Board allows you to manage your Journals (like meeting minutes), Notes and Tasks in one Android app. The app is compatible with the iCal standard (RFC5545) and is integrated with DAVx5 to allow the synchronisation of entries through CalDAV.
https://jtx.techbee.at/
GNU General Public License v3.0
383 stars 10 forks source link

[BUG] Task widget shows wrong due time for tasks in foreign time zone #1275

Open miklcct opened 7 months ago

miklcct commented 7 months ago

Describe the bug

The task widget shows a wrong due time for tasks in a foreign time zone.

To Reproduce

  1. Add a task in another time zone.
  2. Add a task widget.

Expected behavior It shows the correct due time, translated to the device time zone.

Screenshots Screenshot_20240317-212911.png

Screenshot_20240317-212844.png

Screenshot_20240317-212838.png

Device and version

patrickunterwegs commented 7 months ago

Hi @miklcct ! Thank you for your bug report! One more detail: in the settings for "select display of time with timezone", which option did you choose?

miklcct commented 7 months ago

Hi @miklcct ! Thank you for your bug report! One more detail: in the settings for "select display of time with timezone", which option did you choose?

I chose both

patrickunterwegs commented 7 months ago

Okay, thank you! Would you expect to see also both times in the Widget?

duerrhannes commented 7 months ago

Hi @miklcct ! Thank you for your bug report! One more detail: in the settings for "select display of time with timezone", which option did you choose?

I chose both

Same here. No matter which option is selected, the widget displays due dates in UTC time zone. (Which is, in my case, not the device's time zone).

Regards

patrickunterwegs commented 7 months ago

thanks @miklcct @duerrhannes Indeed the implementation is not correct there. I will provide a fix soon. I will change it in a way, so that the widget shows the same as the app (also with the text).

The one question remains, when you choose to show both times (just because myself I'm also not sure what to do with that case) - would you like to see both dates/times in the local and in the given timezone or just one of them?

patrickunterwegs commented 7 months ago

Sorry, my question is also kind of obsolete, I will just do the same as in the list view for now (where the local time is shown)

miklcct commented 7 months ago

It seems that the time is still wrong with a recurring task at UTC+8, device in UTC+1, version 2.7.2

patrickunterwegs commented 7 months ago

Hi @miklcct , thank you for the update. You mean it's still wrong in general or specifically when you have a recurring task?

miklcct commented 7 months ago

Hi @miklcct , thank you for the update. You mean it's still wrong in general or specifically when you have a recurring task?

I can't try it out yet as my widget is filled with other tasks.

patrickunterwegs commented 7 months ago

Could you attach one of your problematic entries as an exported .ics file? I just tried to reproduce the issue, but for me it is the expected behavior. The widget shows the time in the local timezone (ie. the time in the timezone of the device).

miklcct commented 7 months ago
BEGIN:VCALENDAR
VERSION:2.0
PRODID:+//IDN bitfire.at//ical4android
BEGIN:VTODO
DTSTAMP:20240401T212050Z
UID:5d85557c0aca5baa62efce02adae752e
SEQUENCE:0
CREATED:20240331T224517Z
LAST-MODIFIED:20240331T224517Z
SUMMARY:Topup Payme account
DTSTART;TZID=Asia/Hong_Kong:20240331T235959
RECURRENCE-ID;TZID=Asia/Hong_Kong:20240331T235959
PERCENT-COMPLETE:0
PRIORITY:0
DUE;TZID=Asia/Hong_Kong:20240331T235959
END:VTODO
END:VCALENDAR

Screenshot_20240401-222500