![]() |
![]() |
![]() |
libgweather-3.0 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#include <libgweather/gweather.h> GWeatherTimezone; GType gweather_timezone_get_type (void
); #define GWEATHER_TYPE_TIMEZONE const char * gweather_timezone_get_name (GWeatherTimezone *zone
); const char * gweather_timezone_get_tzid (GWeatherTimezone *zone
); int gweather_timezone_get_offset (GWeatherTimezone *zone
); gboolean gweather_timezone_has_dst (GWeatherTimezone *zone
); int gweather_timezone_get_dst_offset (GWeatherTimezone *zone
); GWeatherTimezone * gweather_timezone_ref (GWeatherTimezone *zone
); void gweather_timezone_unref (GWeatherTimezone *zone
); GWeatherTimezone * gweather_timezone_get_utc (void
);
A timezone.
There are no public methods for creating timezones; they can only
be created by calling gweather_location_new_world()
to parse
Locations.xml, and then calling various GWeatherLocation methods
to extract relevant timezones from the location hierarchy.
const char * gweather_timezone_get_name (GWeatherTimezone *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).
|
a GWeatherTimezone |
Returns : |
zone 's name |
const char * gweather_timezone_get_tzid (GWeatherTimezone *zone
);
Gets zone
's tzdata identifier, eg "America/New_York".
|
a GWeatherTimezone |
Returns : |
zone 's tzid |
int gweather_timezone_get_offset (GWeatherTimezone *zone
);
Gets zone
's standard offset from UTC, in minutes. Eg, a value of
120 would indicate "GMT+2".
|
a GWeatherTimezone |
Returns : |
zone 's standard offset, in minutes |
gboolean gweather_timezone_has_dst (GWeatherTimezone *zone
);
Checks if zone
observes daylight/summer time for part of the year.
|
a GWeatherTimezone |
Returns : |
TRUE if zone observes daylight/summer time. |
int gweather_timezone_get_dst_offset (GWeatherTimezone *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
gweather_timezone_has_dst()
returns TRUE
.
|
a GWeatherTimezone |
Returns : |
zone 's daylight/summer time offset, in minutes |
GWeatherTimezone * gweather_timezone_ref (GWeatherTimezone *zone
);
Adds 1 to zone
's reference count.
|
a GWeatherTimezone |
Returns : |
zone |
void gweather_timezone_unref (GWeatherTimezone *zone
);
Subtracts 1 from zone
's reference count and frees it if it reaches 0.
|
a GWeatherTimezone |
GWeatherTimezone * gweather_timezone_get_utc (void
);
Gets the UTC timezone.
Returns : |
a GWeatherTimezone for UTC, or NULL on error. |