From 47f652ae147a21d22827399eae26fea660a849cb Mon Sep 17 00:00:00 2001 From: David Shea Date: Mon, 27 Jun 2016 18:30:54 -0400 Subject: [PATCH 13/24] Fix the calculation of time zone offsets. g_get_real_time returns microseconds, not milliseconds. --- src/cc-timezone-map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cc-timezone-map.c b/src/cc-timezone-map.c index 1e53eec..31a4876 100644 --- a/src/cc-timezone-map.c +++ b/src/cc-timezone-map.c @@ -963,7 +963,7 @@ get_location_offset (CcTimezoneLocation *location) /* Query the zone based on the current time, since otherwise the data * may not make sense. */ - curtime = g_get_real_time () / 1000; /* convert to seconds */ + curtime = g_get_real_time () / 1000000; /* convert to seconds */ interval = g_time_zone_find_interval (zone, G_TIME_TYPE_UNIVERSAL, curtime); offset = g_time_zone_get_offset (zone, interval); -- 2.5.5