diff --git a/0025-Bring-back-the-setting-of-TZ.patch b/0025-Bring-back-the-setting-of-TZ.patch new file mode 100644 index 0000000..346502e --- /dev/null +++ b/0025-Bring-back-the-setting-of-TZ.patch @@ -0,0 +1,46 @@ +From f312d9c6f6a4a81066264d85a8e2a663d6ed7d95 Mon Sep 17 00:00:00 2001 +From: David Shea +Date: Wed, 17 Aug 2016 13:49:37 -0400 +Subject: [PATCH] Bring back the setting of $TZ. + +Callers expect setting the map location to take effect for times within +the process, so just throw thread safety to the wind and do it. +--- + src/cc-timezone-map.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cc-timezone-map.c b/src/cc-timezone-map.c +index 1bad664..d7c99d5 100644 +--- a/src/cc-timezone-map.c ++++ b/src/cc-timezone-map.c +@@ -29,6 +29,7 @@ + #include "tz.h" + #include + #include ++#include + + G_DEFINE_TYPE (CcTimezoneMap, cc_timezone_map, GTK_TYPE_WIDGET) + +@@ -596,16 +597,19 @@ set_location (CcTimezoneMap *map, + { + priv->selected_offset = get_location_offset (priv->location); + priv->show_offset = TRUE; ++ setenv("TZ", cc_timezone_location_get_zone(location), 1); + } + else + { + priv->show_offset = FALSE; + priv->selected_offset = 0.0; ++ unsetenv("TZ"); + } + + render_highlight (map); + gtk_widget_queue_draw (GTK_WIDGET (map)); + ++ + g_signal_emit (map, signals[LOCATION_CHANGED], 0, priv->location); + + } +-- +2.7.4 + diff --git a/libtimezonemap.spec b/libtimezonemap.spec index 6102d7d..67fb5d5 100644 --- a/libtimezonemap.spec +++ b/libtimezonemap.spec @@ -1,6 +1,6 @@ Name: libtimezonemap Version: 0.4.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Time zone map widget for Gtk+ Group: System Environment/Libraries @@ -35,6 +35,7 @@ Patch21: 0021-Added-a-glade-catalog-file.patch Patch22: 0022-Fix-compiler-warnings.patch Patch23: 0023-Do-not-run-the-checks-as-part-of-make-all.patch Patch24: 0024-Fix-issues-with-make-distcheck.patch +Patch25: 0025-Bring-back-the-setting-of-TZ.patch BuildRequires: glib2-devel >= 2.26 BuildRequires: gtk3-devel >= 3.1.4 @@ -98,6 +99,9 @@ make check %{_datadir}/glade/catalogs/TimezoneMap.xml %changelog +* Wed Aug 17 2016 David Shea - 0.4.5-4 +- Bring back the setting of $TZ (#1367647) + * Wed Jun 29 2016 David Shea - 0.4.5-3 - Render the map directly from SVG (#1335158) - Fix memory leaks in tz.c