CalDAV - Incoming tasks do not get correct time zone #1453

Closed
opened 2023-04-02 02:27:49 +00:00 by dead10ck · 3 comments
Contributor

Description

When syncing tasks with CalDAV with the Android Tasks app, the time zone user setting isn't getting respected. If I set the time in Tasks, Vikunja seems to interpret the time zone as GMT instead of my user setting in EST, so it appears in Vikunja as 5 hours earlier than it should be. However, the reverse seems to work fine: if I correct the time in Vikunja, it gets the correct local time in Tasks.

My server's config.yml's service.timezone setting is set to GMT, as it seems appropriate to match the server's timezone, so I'm not sure if maybe that's playing a part. But I would expect the user timezone to take precedence.

I've been able to reproduce this issue in the Tasks app with both direct CalDAV integration as well as through DavX.

Vikunja Frontend Version

0.20.5

Vikunja API Version

0.20.4

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

### Description When syncing tasks with CalDAV with the Android Tasks app, the time zone user setting isn't getting respected. If I set the time in Tasks, Vikunja seems to interpret the time zone as GMT instead of my user setting in EST, so it appears in Vikunja as 5 hours earlier than it should be. However, the reverse seems to work fine: if I correct the time in Vikunja, it gets the correct local time in Tasks. My server's `config.yml`'s `service.timezone` setting is set to `GMT`, as it seems appropriate to match the server's timezone, so I'm not sure if maybe that's playing a part. But I would expect the user timezone to take precedence. I've been able to reproduce this issue in the Tasks app with both direct CalDAV integration as well as through DavX. ### Vikunja Frontend Version 0.20.5 ### Vikunja API Version 0.20.4 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
dead10ck added the
kind/bug
label 2023-04-02 02:27:49 +00:00
Contributor

I observe this issue too, and it has already been reported: https://community.vikunja.io/t/time-zone-is-off-when-created-via-caldav-client/842

After looking into it, I think the problem can be solved on the Vikunja side:
Suppose you have the timezone set to CEST in both tasks.org and Vikunja. If you enter 17:00 as due date in tasks app, then it will be sent like
DUE;TZID=Europe/Berlin:20230402T170001

The problem arises when parsing the incoming VTODO: Vikunja ignores the TZID part and assumes 17:00 at UTC (which is 19:00 in Europe/Berlin). Maybe Vikunja should not ignore the TZID.

I observe this issue too, and it has already been reported: https://community.vikunja.io/t/time-zone-is-off-when-created-via-caldav-client/842 After looking into it, I think the problem can be solved on the Vikunja side: Suppose you have the timezone set to CEST in both tasks.org and Vikunja. If you enter 17:00 as due date in tasks app, then it will be sent like DUE;TZID=Europe/Berlin:20230402T170001 The problem arises when parsing the incoming VTODO: Vikunja ignores the TZID part and assumes 17:00 at UTC (which is 19:00 in Europe/Berlin). Maybe Vikunja should not ignore the TZID.
Owner

Fixed in 1cffef6908

Fixed in https://kolaente.dev/vikunja/api/commit/1cffef6908519f089c4911403663aebda2405540
Author
Contributor

That was a very quick turnaround, thanks!

That was a very quick turnaround, thanks!
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1453
No description provided.