vuntz / maildir-to-ics

4 stars 2 forks source link

invalid TZID values #14

Open aspiers opened 8 years ago

aspiers commented 8 years ago

The program outputs lines like:

DTSTART;TZID="W. Europe Standard Time":20160517T160000

but http://icalendar.org/validator.html corectly highlights this to be an invalid TZID value, as per http://icalendar.org/iCalendar-RFC-5545/3-2-19-time-zone-identifier.html which defines:

   tzidparam  = "TZID" "=" [tzidprefix] paramtext

   tzidprefix = "/"

and paramtext is different to param-value and doesn't allow double-quotes, as per http://icalendar.org/iCalendar-RFC-5545/3-1-content-lines.html

I think this probably explains why for me the team Grapes daily standups are appearing in Google Calendar 2 hours later than they should ...

aspiers commented 8 years ago

Ah, as you said already the script doesn't touch DTSTART, and indeed it appears this brokenness is coming from Groupwise, e.g.

DESCRIPTION:
 Regular stand-up meeting for team Grapes\, excluding Mondays.\n\nMumble: Gr
 apes room\nVideo (if needed): jangouts.suse.de\n\nTrello: https://trello.c
 om/b/agdxwQvh/suse-cloud-sprint-board-team-grapes\n
ATTACH:CID:...
LOCATION:mumble
DTEND;TZID="GMT+0100":20160401T104500
DTSTART;TZID="GMT+0100":20160401T103000
RRULE:FREQ=WEEKLY;UNTIL=20160630T083000Z;WKST=SU;BYDAY=TU,WE,TH,FR
UID:20160331T082256Z_F8CA00301E2@suse.com

What a surprise!! Are you OK with me adding a hack to the script to fix these?

aspiers commented 8 years ago

I have confirmed that this is the cause of the wrong timings in my Google Calendar. This simple fix seems good enough:

sed -i 's/TZID="\(.\+\)"/TZID=\1/' "$ics"

but I guess it wouldn't do any harm to add an equivalent hack to the script, given that the two main users are consuming broken vevent streams from Groupwise ...