## ICalTimezone ICalTimezone |

## Functions

ICalTimezone * | i_cal_timezone_new ()
ICalTimezone * | i_cal_timezone_copy ()
void | i_cal_timezone_free ()
void | i_cal_timezone_set_tzid_prefix ()
void | i_cal_timezone_free_builtin_timezones ()
ICalTimezone * | i_cal_timezone_get_builtin_timezone ()
ICalTimezone * | i_cal_timezone_get_builtin_timezone_from_offset ()
ICalTimezone * | i_cal_timezone_get_builtin_timezone_from_tzid ()
ICalArray * | i_cal_timezone_get_builtin_timezones ()
ICalTimezone * | i_cal_timezone_get_utc_timezone ()
const gchar * | i_cal_timezone_get_tzid ()
const gchar * | i_cal_timezone_get_location ()
const gchar * | i_cal_timezone_get_tznames ()
gdouble | i_cal_timezone_get_latitude ()
gdouble | i_cal_timezone_get_longitude ()
ICalComponent * | i_cal_timezone_get_component ()
gint | i_cal_timezone_set_component ()
const gchar * | i_cal_timezone_get_display_name ()
void | i_cal_time_convert_timezone ()
gint | i_cal_timezone_get_utc_offset ()
gint | i_cal_timezone_get_utc_offset_of_utc_time ()
ICalArray * | i_cal_timezone_array_new ()
void | i_cal_timezone_array_append_from_vtimezone ()
void | i_cal_timezone_array_free ()
void | i_cal_time_timezone_expand_vtimezone ()
gchar * | i_cal_timezone_get_location_from_vtimezone ()
gchar * | i_cal_timezone_get_tznames_from_vtimezone ()
const gchar * | i_cal_timezone_get_zone_directory ()
void | i_cal_timezone_set_zone_directory ()
void | i_cal_timezone_free_zone_directory ()
void | i_cal_timezone_release_zone_tab ()
void | i_cal_timezone_set_builtin_tzdata ()
gboolean | i_cal_timezone_get_builtin_tzdata ()
gint | i_cal_timezone_dump_changes ()
ICalTimezone * | i_cal_timezone_array_element_at ()

## Types and Values

| ICalTimezone
struct | ICalTimezoneClass

## Object Hierarchy

        GObject
        ╰── ICalObject
            ╰── ICalTimezone

## Description

## Functions

### i_cal_timezone_new ()

    ICalTimezone *
    i_cal_timezone_new (void);

The constructor of the type ICalTimezone.

#### Returns

The newly created object of the type ICalTimezone.

[transfer full][nullable]

Since: 1.0

### i_cal_timezone_copy ()

    ICalTimezone *
    i_cal_timezone_copy (const ICalTimezone *zone);

The clone method for ICalTimezone.

#### Parameters

zone | The ICalTimezone needs to be cloned |

#### Returns

The newly created ICalTimezone with the same values as `zone` .

[transfer full]

Since: 1.0

### i_cal_timezone_free ()

    void
    i_cal_timezone_free (ICalTimezone *zone,
                         gint free_struct);

The destructor of ICalTimezone.

[skip]

#### Parameters

zone | The ICalTimezone to be freed |
free_struct | Whether to free it or reset it. 1 to free and 0 to reset |

Since: 1.0

### i_cal_timezone_set_tzid_prefix ()

    void
    i_cal_timezone_set_tzid_prefix (const gchar *new_prefix);

Sets the prefix to be used for tzid's generated from system tzdata. Must be globally unique (such as a domain name owned by the developer of the calling application), and begin and end with forward slashes. Do not change or de-allocate the string buffer after calling this.

#### Parameters

new_prefix | The ICalTimezone to be set |

Since: 1.0

### i_cal_timezone_free_builtin_timezones ()

    void
    i_cal_timezone_free_builtin_timezones (void);

Frees any builtin timezone information.

Since: 1.0

### i_cal_timezone_get_builtin_timezone ()

    ICalTimezone *
    i_cal_timezone_get_builtin_timezone (const gchar *location);

Returns a single builtin timezone, given its Olson city name.

#### Parameters

location | The location representing the timezone. | [nullable]

#### Returns

The builtin ICalTimezone with the name of `location` .

[transfer none][nullable]

Since: 1.0

### i_cal_timezone_get_builtin_timezone_from_offset ()

    ICalTimezone *
    i_cal_timezone_get_builtin_timezone_from_offset
                                   (gint offset,
                                    const gchar *tzname);

Returns a single builtin timezone, given its offset.

#### Parameters

offset | The offset used to get the ICalTimezone |
tzname | The reference ICalTimezone name. | [nullable]

#### Returns

(transfer none)

Since: 1.0

### i_cal_timezone_get_builtin_timezone_from_tzid ()

    ICalTimezone *
    i_cal_timezone_get_builtin_timezone_from_tzid
                                   (const gchar *tzid);

Returns a single builtin timezone, given its TZID.

#### Parameters

tzid | The tzid name. | [nullable]

#### Returns

(transfer none)

Since: 1.0

### i_cal_timezone_get_builtin_timezones ()

    ICalArray *
    i_cal_timezone_get_builtin_timezones (void);

Returns a list of builtin timezones.

#### Returns

An ICalArray of the builtin ICalTimezone objects.

[transfer none]

Since: 1.0

### i_cal_timezone_get_utc_timezone ()

    ICalTimezone *
    i_cal_timezone_get_utc_timezone (void);

Returns the UTC timezone.

#### Returns

The utc ICalTimezone.

[transfer none]

Since: 1.0

### i_cal_timezone_get_tzid ()

    const gchar *
    i_cal_timezone_get_tzid (const ICalTimezone *zone);

Returns the TZID of a timezone, or `NULL`, when none is set or when `zone` is also `NULL`.

#### Parameters

zone | The ICalTimezone to be queried. | [nullable]

#### Returns

The timezone id, or `NULL`.

[nullable]

Since: 1.0

### i_cal_timezone_get_location ()

    const gchar *
    i_cal_timezone_get_location (const ICalTimezone *zone);

Returns the city name of a timezone, or `NULL`, when none is set or when `zone` is also `NULL`.

#### Parameters

zone | The ICalTimezone to be queried. | [nullable]

#### Returns

The location of the ICalTimezone, or `NULL`.

[nullable]

Since: 1.0

### i_cal_timezone_get_tznames ()

    const gchar *
    i_cal_timezone_get_tznames (const ICalTimezone *zone);

Returns the TZNAME properties used in the latest STANDARD and DAYLIGHT components. If they are the same it will return just one, e.g. "LMT". If they are different it will format them like "EST/EDT". Note that this may also return NULL.

#### Parameters

zone | The ICalTimezone to be queried. | [nullable]

#### Returns

The timezone name.

[nullable]

Since: 1.0

### i_cal_timezone_get_latitude ()

    gdouble
    i_cal_timezone_get_latitude (const ICalTimezone *zone);

Returns the latitude of a builtin timezone.

#### Parameters

zone | The ICalTimezone to be queried. | [nullable]

#### Returns

The latitude of the ICalTimezone

Since: 1.0

### i_cal_timezone_get_longitude ()

    gdouble
    i_cal_timezone_get_longitude (const ICalTimezone *zone);

Returns the longitude of a builtin timezone.

#### Parameters

zone | The ICalTimezone to be queried. | [nullable]

#### Returns

The longitude of the ICalTimezone.

Since: 1.0

### i_cal_timezone_get_component ()

    ICalComponent *
    i_cal_timezone_get_component (const ICalTimezone *zone);

Returns the VTIMEZONE component of a timezone.

#### Parameters

zone | The ICalTimezone to be queried. | [nullable]

#### Returns

The VTIMEZONE component of the `zone` .

[transfer full]

Since: 1.0

### i_cal_timezone_set_component ()

    gint
    i_cal_timezone_set_component (ICalTimezone *zone,
                                  ICalComponent *comp);

Sets the VTIMEZONE component of ICalTimezone, initializing the tzid, location and tzname fields. It returns 1 on success or 0 on failure, i.e. no TZID was found.

`note` The `zone` assumes ownership of the `comp` , thus make sure you pass an unowned ICalComponent.

#### Parameters

zone | The ICalTimezone to be set |
comp | The VTIMEZONE component of an ICalTimezone, initializing the tzid, location and tzname fields |

#### Returns

Whether the action is successful. 1 for success, 0 for failure.

Since: 1.0

### i_cal_timezone_get_display_name ()

    const gchar *
    i_cal_timezone_get_display_name (const ICalTimezone *zone);

Gets the display name of the `zone` .

#### Parameters

zone | The ICalTimezone to be queried. | [nullable]

#### Returns

The display name of `zone`

Since: 1.0

### i_cal_time_convert_timezone ()

    void
    i_cal_time_convert_timezone (ICalTime *tt,
                                 ICalTimezone *from_zone,
                                 ICalTimezone *to_zone);

Convert time from one timezone to another.

#### Parameters

tt | The time to be converted |
from_zone | From timezone. | [nullable]
to_zone | To timezone. | [nullable]

Since: 1.0

### i_cal_timezone_get_utc_offset ()

    gint
    i_cal_timezone_get_utc_offset (ICalTimezone *zone,
                                   ICalTime *tt,
                                   gint *is_daylight);

Calculates the UTC offset of a given local time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.

#### Parameters

zone | The given ICalTimezone. | [nullable]
tt | The local time. | [nullable]
is_daylight | Whether it is day light. | [out][optional]

#### Returns

UTC offset of the `zone`

Since: 1.0

### i_cal_timezone_get_utc_offset_of_utc_time ()

    gint
    i_cal_timezone_get_utc_offset_of_utc_time
                                   (ICalTimezone *zone,
                                    ICalTime *tt,
                                    gint *is_daylight);

Calculates the UTC offset of a given UTC time in the given timezone. It is the number of seconds to add to UTC to get local time. The is_daylight flag is set to 1 if the time is in daylight-savings time.

#### Parameters

zone | The given ICalTimezone. | [nullable]
tt | The local time |
is_daylight | Whether it is day light, can be `NULL`. | [out][optional]

#### Returns

UTC offset of the `zone`

Since: 1.0

### i_cal_timezone_array_new ()

    ICalArray *
    i_cal_timezone_array_new (void);

Creates a new array of timezones.

#### Returns

Create a new array.

[transfer full]

Since: 1.0

### i_cal_timezone_array_append_from_vtimezone ()

    void
    i_cal_timezone_array_append_from_vtimezone
                                   (ICalArray *timezones,
                                    ICalComponent *child);

Populate the array of timezones with a component.

`note` The `timezones` assumes ownership of the `child` , thus make sure you pass an unowned ICalComponent.

#### Parameters

timezones | The timezones to be populated |
child | The component to be appended to `timezones` |

Since: 1.0

### i_cal_timezone_array_free ()

    void
    i_cal_timezone_array_free (ICalArray *timezones);

Frees an array of timezones.

[skip]

#### Parameters

timezones | Free an array |

Since: 1.0

### i_cal_time_timezone_expand_vtimezone ()

    void
    i_cal_time_timezone_expand_vtimezone (ICalComponent *comp,
                                          gint end_year,
                                          ICalArray *changes);

Applies a list of timezone changes on the array of components until the end year.

#### Parameters

comp | The ICalComponent |
end_year | The end year |
changes | The changes to be applies |

Since: 2.0

### i_cal_timezone_get_location_from_vtimezone ()

    gchar *
    i_cal_timezone_get_location_from_vtimezone
                                   (ICalComponent *component);

Gets the location of the vtimezone in component.

#### Parameters

component | The ICalComponent to be queried |

#### Returns

The location of vtimezone.

Since: 2.0

### i_cal_timezone_get_tznames_from_vtimezone ()

    gchar *
    i_cal_timezone_get_tznames_from_vtimezone
                                   (ICalComponent *component);

Gets the name of the vtimezone in component.

#### Parameters

component | The ICalComponent to be queried |

#### Returns

The name of vtimezone.

Since: 2.0

### i_cal_timezone_get_zone_directory ()

    const gchar *
    i_cal_timezone_get_zone_directory (void);

Gets the directory to look for the zonefiles.

#### Returns

The path to look for the zonefiles

Since: 3.0.17

### i_cal_timezone_set_zone_directory ()

    void
    i_cal_timezone_set_zone_directory (const gchar *path);

Sets the directory to look for the zonefiles.

#### Parameters

path | The path to look for the zonefiles |

Since: 1.0

### i_cal_timezone_free_zone_directory ()

    void
    i_cal_timezone_free_zone_directory (void);

Frees memory dedicated to the zonefile directory.

Since: 1.0

### i_cal_timezone_release_zone_tab ()

    void
    i_cal_timezone_release_zone_tab (void);

Frees memory dedicated to the zonefile directory.

Since: 1.0

### i_cal_timezone_set_builtin_tzdata ()

    void
    i_cal_timezone_set_builtin_tzdata (gboolean set);

Sets whether to use builtin timezones files.

#### Parameters

set | Whether to use builtin timezones files |

Since: 2.0

### i_cal_timezone_get_builtin_tzdata ()

    gboolean
    i_cal_timezone_get_builtin_tzdata (void);

Gets whether to use builtin timezones files.

#### Returns

Whether to use builtin timezones files.

Since: 2.0

### i_cal_timezone_dump_changes ()

    gint
    i_cal_timezone_dump_changes (ICalTimezone *zone,
                                 gint max_year,
                                 FILE *fp);

Outputs a list of timezone changes for the given timezone to the given file, up to the maximum year given.

#### Parameters

zone | The timezone to be queried |
max_year | Max year |
fp | The file handle |

#### Returns

1 if success.

Since: 1.0

### i_cal_timezone_array_element_at ()

    ICalTimezone *
    i_cal_timezone_array_element_at (ICalArray *timezones,
                                     guint index);

Gets the ICalTimezone at specified position in array.

#### Parameters

timezones | The array to be visited |
index | The index |

#### Returns

The ICalTimezone at the position `index` in `timezones` .

[transfer full]

Since: 1.0

## Types and Values

### ICalTimezone

    typedef struct _ICalTimezone ICalTimezone;

This is the ICalTimezone instance.

### struct ICalTimezoneClass

    struct ICalTimezoneClass {
    };

This is the ICalTimezone class.