libtimezonemap/0013-Fix-the-calculation-of-time-zone-offsets.patch
David Shea 51a02b6c80 Update the map data and improve behavior:
- Render the map directly from SVG (#1335158)
- Fix memory leaks in tz.c
- Fix an invalid memory access
- Do not modify TZ in the process environment
- Move all data files to /usr/share/libtimezonemap from .../libtimezonemap/ui
- Add extra city data so all timezone offsets are clickable
- Move Venezuela from -04:30 to -04:00
- Fix the conversion of points just west of 180 longitude
- Remove the out-of-date Olson map data
- Update the "backward" file
- Improve the location selected when setting the timezone by name (#1322648)
- Remove an extra line in the +10:00 layer
- Move Chile back an hour
2016-06-29 14:56:01 -04:00

27 lines
954 B
Diff

From 47f652ae147a21d22827399eae26fea660a849cb Mon Sep 17 00:00:00 2001
From: David Shea <dshea@redhat.com>
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