How to get the Unixtime of an event?
Bastian Seeleib
bastian at seeleib.net
Sun Aug 14 13:15:43 PDT 2016
Hi all,
i'm trying to get the unixtime of an event and having trouble with it,
could someone help me?
Using the follwing function calls, i'm getting 1471941000 which is 2
hours later than expected.
icalproperty *pt = icalcomponent_get_first_property(comp,
ICAL_DTSTART_PROPERTY);
struct icaltimetype t = icalproperty_get_dtstart(pt);
printf("%ld", icaltime_as_timet(t));
The dates are defined as following:
DTSTART;TZID="Central Europe":20160823T083000
DTEND;TZID="Central Europe":20160823T103000
The VTIMEZINE is set to:
BEGIN:VTIMEZONE
TZID:Central Europe
BEGIN:STANDARD
DTSTART:19501029T020000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19500326T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;BYMINUTE=0;BYHOUR=2;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
To me it seems that the definition of VTIMEZONE is ignored.
More information about the libical-devel
mailing list