CafeWeatherTimezone: libcafeweather Reference Manual

## CafeWeatherTimezone CafeWeatherTimezone |

## Functions

const char * | cafeweather_timezone_get_name ()
const char * | cafeweather_timezone_get_tzid ()
int | cafeweather_timezone_get_offset ()
gboolean | cafeweather_timezone_has_dst ()
int | cafeweather_timezone_get_dst_offset ()
CafeWeatherTimezone * | cafeweather_timezone_ref ()
void | cafeweather_timezone_unref ()

## Types and Values

| CafeWeatherTimezone

## Object Hierarchy

        GBoxed
        ╰── CafeWeatherTimezone

## Description

A timezone.

There are no public methods for creating timezones; they can only be created by calling `cafeweather_location_new_world()` to parse Locations.xml, and then calling various CafeWeatherLocation methods to extract relevant timezones from the location hierarchy.

## Functions

### cafeweather_timezone_get_name ()

    const char *
    cafeweather_timezone_get_name (CafeWeatherTimezone *zone);

Gets `zone` 's name; a translated, user-presentable string.

Note that the returned name might not be unique among timezones, and may not make sense to the user unless it is presented along with the timezone's country's name (or in some context where the country is obvious).

#### Parameters

zone | a CafeWeatherTimezone |

#### Returns

`zone` 's name

### cafeweather_timezone_get_tzid ()

    const char *
    cafeweather_timezone_get_tzid (CafeWeatherTimezone *zone);

Gets `zone` 's tzdata identifier, eg "America/New_York".

#### Parameters

zone | a CafeWeatherTimezone |

#### Returns

`zone` 's tzid

### cafeweather_timezone_get_offset ()

    int
    cafeweather_timezone_get_offset (CafeWeatherTimezone *zone);

Gets `zone` 's standard offset from UTC, in minutes. Eg, a value of `120` would indicate "GMT+2".

#### Parameters

zone | a CafeWeatherTimezone |

#### Returns

`zone` 's standard offset, in minutes

### cafeweather_timezone_has_dst ()

    gboolean
    cafeweather_timezone_has_dst (CafeWeatherTimezone *zone);

Checks if `zone` observes daylight/summer time for part of the year.

#### Parameters

zone | a CafeWeatherTimezone |

#### Returns

`TRUE` if `zone` observes daylight/summer time.

### cafeweather_timezone_get_dst_offset ()

    int
    cafeweather_timezone_get_dst_offset (CafeWeatherTimezone *zone);

Gets `zone` 's daylight/summer time offset from UTC, in minutes. Eg, a value of `120` would indicate "GMT+2". This is only meaningful if `cafeweather_timezone_has_dst()` returns `TRUE`.

#### Parameters

zone | a CafeWeatherTimezone |

#### Returns

`zone` 's daylight/summer time offset, in minutes

### cafeweather_timezone_ref ()

    CafeWeatherTimezone *
    cafeweather_timezone_ref (CafeWeatherTimezone *zone);

Adds 1 to `zone` 's reference count.

#### Parameters

zone | a CafeWeatherTimezone |

#### Returns

`zone`

### cafeweather_timezone_unref ()

    void
    cafeweather_timezone_unref (CafeWeatherTimezone *zone);

Subtracts 1 from `zone` 's reference count and frees it if it reaches 0.

#### Parameters

zone | a CafeWeatherTimezone |

## Types and Values

### CafeWeatherTimezone

    typedef struct _CafeWeatherTimezone CafeWeatherTimezone;