Creating a new calendar - icaltimezone_get_component() return NULL

Graham Leggett minfrin at sharp.fm
Sun Oct 18 15:50:04 PDT 2015


Hi all,

I am currently trying to create a new calendar using libical, and an trying to add the VTIMEZONE element like so:

        newtz = icaltimezone_get_utc_timezone(); // initially UTC
        tcomp = icaltimezone_get_component(newtz);
        // tcomp is NULL
        ccomp = icalcomponent_new(ICAL_XROOT_COMPONENT);
        icalcomponent_add_component(ccomp, tcomp);

I’m having no luck though - icaltimezone_get_component() returns NULL for UTC (which is my starting point for testing).

Can anyone confirm the correct way that icaltimezone_get_component() should be used so that a valid component is returned?

Regards,
Graham
—




More information about the libical-devel mailing list