summaryrefslogtreecommitdiff
path: root/libgweather
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-11-23 23:11:52 +0000
committerEmmanuele Bassi <ebassi@gmail.com>2021-11-26 20:40:21 +0000
commit0f1fe5b5a41d4024008d314c81fc298e65fc7b33 (patch)
tree56f43d1e682a639a5b645db9043e2003b353f55a /libgweather
parentf37b071f2530493e2a70c13cd032267d6fd3e56a (diff)
downloadlibgweather-0f1fe5b5a41d4024008d314c81fc298e65fc7b33.tar.gz
Remove year fields from GWeatherDb
They were used by the time zone parsing code, and that has been removed, so we can remove them as well.
Diffstat (limited to 'libgweather')
-rw-r--r--libgweather/gweather-private.c13
-rw-r--r--libgweather/gweather-private.h3
2 files changed, 0 insertions, 16 deletions
diff --git a/libgweather/gweather-private.c b/libgweather/gweather-private.c
index d1110cd..6df95c8 100644
--- a/libgweather/gweather-private.c
+++ b/libgweather/gweather-private.c
@@ -46,8 +46,6 @@ ensure_world (gpointer dummy G_GNUC_UNUSED)
g_autofree char *filename = NULL;
g_autoptr (GMappedFile) map;
const char *locations_path;
- time_t now;
- struct tm tm;
GWeatherDb *db = NULL;
locations_path = g_getenv ("LIBGWEATHER_LOCATIONS_PATH");
@@ -88,17 +86,6 @@ ensure_world (gpointer dummy G_GNUC_UNUSED)
g_ptr_array_set_size (db->locations, db_arrayof_location_get_length (db->locations_ref));
g_ptr_array_set_size (db->timezones, db_world_timezones_get_length (db->timezones_ref));
- /* Get timestamps for the start and end of this year.
- * This is used to parse timezone information. */
- now = time (NULL);
- tm = *gmtime (&now);
- tm.tm_mon = 0;
- tm.tm_mday = 1;
- tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
- db->year_start = mktime (&tm);
- tm.tm_year++;
- db->year_end = mktime (&tm);
-
world_db = db;
return db;
diff --git a/libgweather/gweather-private.h b/libgweather/gweather-private.h
index bb973a8..d2ba299 100644
--- a/libgweather/gweather-private.h
+++ b/libgweather/gweather-private.h
@@ -34,9 +34,6 @@ typedef struct {
GPtrArray *locations;
GPtrArray *timezones;
-
- time_t year_start;
- time_t year_end;
} GWeatherDb;
struct _GWeatherLocation {