47 lines
1.2 KiB
Diff
47 lines
1.2 KiB
Diff
From f312d9c6f6a4a81066264d85a8e2a663d6ed7d95 Mon Sep 17 00:00:00 2001
|
|
From: David Shea <dshea@redhat.com>
|
|
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 <librsvg/rsvg.h>
|
|
#include <string.h>
|
|
+#include <stdlib.h>
|
|
|
|
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
|
|
|