util_comp_time_to_zone


Description:


[ Version ( since = "3.58" ) ]
public time_t util_comp_time_to_zone (Component icomp, PropertyKind prop_kind, Timezone? to_zone, Component? vcalendar, TimezoneCache? tz_cache, out Time out_itt)

Converts the time/date property prop_kind to to_zone.

When such property does not exist, or does not contain DATE nor DATE-TIME value, then the function returns -1 and no output argument is set.

The vcalendar is used to get the timezone for the property, if provided, otherwise the timezone is tried to be found in the tz_cache. If neither can get it, the iCal builtin timezones are checked. When the set timezone cannot be found, floating time is used (which can be almost always wrong).

Note: this uses get_first_property, thus it cannot be used in case any upper caller uses it too at the same time.

Parameters:

icomp

an Component to get the property from

prop_kind

an PropertyKind of the property to read

to_zone

an Timezone to convert the time to, or null for UTC

vcalendar

an optional VCALENDAR component with timezones for the icomp, or null when not available

tz_cache

an TimezoneCache to use to read the time zones from, or null if not available

out_itt

return location for the converted time as Time, or null when not requested

Returns:

property's time converted into to_zone, or -1, when the conversion was not possible.


Namespace: ECal
Package: libecal-2.0