libkcal
icaltimezone.h File Reference
timezone handling routines More...
#include <stdio.h>
#include "icaltime.h"
#include "icalarray.h"
#include "icalcomponent.h"
Go to the source code of this file.
Detailed Description
timezone handling routines
Definition in file icaltimezone.h.
Function Documentation
void free_zone_directory | ( | void | ) |
Free memory dedicated to the zonefile directory.
void icaltimezone_array_append_from_vtimezone | ( | icalarray * | timezones, | |
icalcomponent * | child | |||
) |
void icaltimezone_array_free | ( | icalarray * | timezones | ) |
icalarray* icaltimezone_array_new | ( | void | ) |
void icaltimezone_convert_time | ( | struct icaltimetype * | tt, | |
icaltimezone * | from_zone, | |||
icaltimezone * | to_zone | |||
) |
- Converting times between timezones.
int icaltimezone_dump_changes | ( | icaltimezone * | zone, | |
int | max_year, | |||
FILE * | fp | |||
) |
Dumps information about changes in the timezone up to and including max_year.
void icaltimezone_free | ( | icaltimezone * | zone, | |
int | free_struct | |||
) |
Frees all memory used for the icaltimezone.
Set free_struct to free the icaltimezone struct as well.
void icaltimezone_free_builtin_timezones | ( | void | ) |
Free any builtin timezone information.
- Accessing timezones.
icaltimezone* icaltimezone_get_builtin_timezone | ( | const char * | location | ) |
Returns a single builtin timezone, given its Olson city name.
icaltimezone* icaltimezone_get_builtin_timezone_from_tzid | ( | const char * | tzid | ) |
Returns a single builtin timezone, given its TZID.
icalarray* icaltimezone_get_builtin_timezones | ( | void | ) |
Returns the array of builtin icaltimezones.
icalcomponent* icaltimezone_get_component | ( | icaltimezone * | zone | ) |
Returns the VTIMEZONE component of a timezone.
double icaltimezone_get_latitude | ( | icaltimezone * | zone | ) |
Returns the latitude of a builtin timezone.
const char* icaltimezone_get_location | ( | icaltimezone * | zone | ) |
Returns the city name of a timezone.
double icaltimezone_get_longitude | ( | icaltimezone * | zone | ) |
Returns the longitude of a builtin timezone.
const char* icaltimezone_get_tzid | ( | icaltimezone * | zone | ) |
Returns the TZID of a timezone.
const char* icaltimezone_get_tznames | ( | 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.
int icaltimezone_get_utc_offset | ( | icaltimezone * | zone, | |
struct icaltimetype * | tt, | |||
int * | is_daylight | |||
) |
Calculates the UTC offset of a given local time in the given timezone.
- Getting offsets from UTC. 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.
int icaltimezone_get_utc_offset_of_utc_time | ( | icaltimezone * | zone, | |
struct icaltimetype * | tt, | |||
int * | 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.
icaltimezone* icaltimezone_get_utc_timezone | ( | void | ) |
Returns the UTC timezone.
icaltimezone* icaltimezone_new | ( | void | ) |
Creates a new icaltimezone.
- Creating/Destroying individual icaltimezones.
int icaltimezone_set_component | ( | icaltimezone * | zone, | |
icalcomponent * | comp | |||
) |
Sets the VTIMEZONE component of an icaltimezone, initializing the tzid, location & tzname fields.
It returns 1 on success or 0 on failure, i.e. no TZID was found.
void set_zone_directory | ( | char * | path | ) |
Set the directory to look for the zonefiles.