[Freeassociation-devel] libical fix - icaltimezone_get_builtin_timezone yields vtimezone with bad DTSTART

Gren Elliot gren.elliot at scalix.com
Thu Aug 6 04:38:57 PDT 2009


Hi dothebart,

Here is the first promised patch, plus an example program demonstrating 
the issue - which is that "icaltimezone_get_builtin_timezone" yields a 
timezone which has invalid DTSTART information for both standard and 
daylight times.  The TZOFFSETFROM UTC offset should be used to compute 
the localtime for DTSTART.

I compiled the example program on Fedora 10 (with libical-0.43-4.fc10 
installed) using :
gcc -o tzidToVTIMEZONE -I/usr/include/libical -lical tzidToVTIMEZONE.c

Running the binary :
./tzidToVIMEZONE

yields (with annotations) :
BEGIN:VTIMEZONE
TZID:/freeassociation.sourceforge.net/Tzfile/Europe/Zurich
X-LIC-LOCATION:Europe/Zurich
BEGIN:STANDARD
TZNAME:CET
DTSTART:19701025T020000 <--- should end in 030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:CEST
DTSTART:19700328T030000 <--- should end in 020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
END:DAYLIGHT
END:VTIMEZONE

Thanks and regards,
Gren.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bad-dtstart-in-timezone.patch
URL: <http://lists.infradead.org/pipermail/libical-devel/attachments/20090806/fff6a609/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tzidToVTIMEZONE.c
URL: <http://lists.infradead.org/pipermail/libical-devel/attachments/20090806/fff6a609/attachment.c>


More information about the libical-devel mailing list