vikunja icon indicating copy to clipboard operation
vikunja copied to clipboard

CalDAV: Times have offset of timezone

Open mtettke123 opened this issue 2 years ago • 5 comments

There seems to be a small bug when syncing times via CalDAV: Date/Time in App (Tasks.org) index

Date/Time Synced to Vikunja: grafik

Timezone: grafik

The offset seems to be exactly the timezone...

mtettke123 avatar Jul 14 '22 08:07 mtettke123

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.

theryxs avatar Jul 18 '22 17:07 theryxs

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.

mtettke123 avatar Jul 19 '22 06:07 mtettke123

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.

kolaente avatar Aug 02 '22 13:08 kolaente

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...

mtettke123 avatar Aug 02 '22 14:08 mtettke123

Is the Timezone setting in Vikunja used by the Frontend to adjust the time?

It's not. That depends on your browser.

kolaente avatar Aug 02 '22 15:08 kolaente

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

bfly75 avatar Dec 04 '22 09:12 bfly75

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.

kolaente avatar Dec 04 '22 19:12 kolaente

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.

kolaente avatar Dec 04 '22 20:12 kolaente

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!

andersmmg avatar Dec 06 '22 15:12 andersmmg