1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
/* Generic timezone utilities.
4
* Copyright (C) 2000-2001 Ximian, Inc.
6
* Authors: Hans Petter Jansson <hpj@ximian.com>
8
* Largely based on Michael Fulbright's work on Anaconda.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
32
# define TZ_DATA_FILE "/usr/share/zoneinfo/zone.tab"
34
# define TZ_DATA_FILE "/usr/share/lib/zoneinfo/tab/zone_sun.tab"
37
typedef struct _TzDB TzDB;
38
typedef struct _TzLocation TzLocation;
39
typedef struct _TzInfo TzInfo;
56
gdouble dist; /* distance to clicked point for comparison */
59
/* see the glibc info page information on time zone information */
60
/* tzname_normal is the default name for the timezone */
61
/* tzname_daylight is the name of the zone when in daylight savings */
62
/* utc_offset is offset in seconds from utc */
63
/* daylight if non-zero then location obeys daylight savings */
68
gchar *tzname_daylight;
74
TzDB *tz_load_db (void);
75
void tz_db_free (TzDB *db);
76
char * tz_info_get_clean_name (TzDB *tz_db,
78
GPtrArray *tz_get_locations (TzDB *db);
79
void tz_location_get_position (TzLocation *loc,
80
double *longitude, double *latitude);
81
char *tz_location_get_country (TzLocation *loc);
82
gchar *tz_location_get_zone (TzLocation *loc);
83
gchar *tz_location_get_comment (TzLocation *loc);
84
glong tz_location_get_utc_offset (TzLocation *loc);
85
gint tz_location_set_locally (TzLocation *loc);
86
TzInfo *tz_info_from_location (TzLocation *loc);
87
void tz_info_free (TzInfo *tz_info);