openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

CALDAV uses local time if DTSTART has no timezone information #5973

Closed teclab-at closed 3 years ago

teclab-at commented 3 years ago

When using a desktop browser entering a new event in google calendar, there is no timestamp added, instead it assumes UTC if timezone is empty. Here an extract of the .ics file:

BEGIN:VEVENT
DTSTART:20201119T133000Z
DTEND:20201119T143000Z
DTSTAMP:20201112T214406Z
UID:79ivo0gjfcci2c3c1n6tmmjnne@google.com
CREATED:20201112T214406Z
DESCRIPTION:
LAST-MODIFIED:20201112T214406Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Emil Grippe Impfen
TRANSP:OPAQUE
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:This is an event reminder
TRIGGER:-P0DT0H30M0S
END:VALARM
END:VEVENT

When using the android app still there is a timezone added: DTSTART;TZID=Europe/Vienna:20201119T161500

When CALDAV now parses DTSTART:20201119T133000Z it assumes a local time ... which is wrong.

Setting the caldavio:timeZone=UTC shows no effect.

I am currently on the master branch. Switching to stable shows no difference.

thx

teclab-at commented 3 years ago

By the way, I am on RaspPi (OpenHabian).

When I set the OS timezone to UTC and the runtime.cfg to org.eclipse.smarthome.i18n:timezone=Europe/Vienna the problem gets the opposite. The entry without timezone gets correctly parsed, the one with timezone gets one hour added.

So the most likely explanation is that the timezone of the DTSTART is not used at all.

9037568 commented 3 years ago

This repository is closed.