vikunja
vikunja copied to clipboard
CalDAV: Times have offset of timezone
There seems to be a small bug when syncing times via CalDAV:
Date/Time in App (Tasks.org)
Date/Time Synced to Vikunja:
Timezone:
The offset seems to be exactly the timezone...
Vikunja uses 'GMT' as default timezone if none is configured. https://vikunja.io/docs/config-options/#timezone
Setting the environment variable to CET for Europe/Berlin worked for me.
Doesn't work for me. Changed VIKUNJA_SERVICE_TIMEZONE: "Europe/Berlin" to VIKUNJA_SERVICE_TIMEZONE: "CET"
- no changes.
Even tried without VIKUNJA_SERVICE_TIMEZONE being set - same result.
Vikunja returns all time zones in utc. It should be the responsibility of the client to adjust it based on the time configured on the client.
The time zone in VIkunja's settings is only used to handle reminders and other transactional emails.
Is the Timezone setting in Vikunja used by the Frontend to adjust the time? It's so strange: If I send a due date via CalDAV it's off by 2 hours in Vikunja web regardlessly if the timezone ist set... And it doesn't seem to matter if I change the setting in the docker-compose file or in the vikunja web interface in settings...
Is the Timezone setting in Vikunja used by the Frontend to adjust the time?
It's not. That depends on your browser.
Vikunja returns all time zones in utc. It should be the responsibility of the client to adjust it based on the time configured on the client.
the date-times in the VTODO object obtained from Vikunja's CalDav seems to 'floating' and not bound to any time zone in particular: DUE:20221209T144501
If it has to be truely a fixed UTC time, it should end with 'Z' :
DUE:20221209T144501Z
At least the Open-Xchange Caldav server also includes the 'Z'.
See also: https://icalendar.org/iCalendar-RFC-5545/3-3-5-date-time.html
Changing VIkunja's calDAV output so that it always adds the Z
suffix to dates is easy, but that does not solve the original problem. Task.org seems to send dates without any time zone attached to them and thus they are assumed to be UTC and saved as such in the db. When opening the task in the browser, it converts the returned utc date to the time zone set in the browser.
I've added the Z
suffix in c3de15aa892f273ecdc5fb353d65b076c04b95a3. Given the rest seems to be a client limitation, I'll close this issue now.
Don't hesitate to ping if you encounter other problems.
This seems to fix the issue for me as well, with Vikunja configured to use my time zone and Tasks.org shows it the same!