Blob Blame History Raw
diff -up gnome-panel-2.21.91/applets/clock/clock-location-tile.c.sunrise gnome-panel-2.21.91/applets/clock/clock-location-tile.c
--- gnome-panel-2.21.91/applets/clock/clock-location-tile.c.sunrise	2008-02-22 12:56:42.000000000 -0500
+++ gnome-panel-2.21.91/applets/clock/clock-location-tile.c	2008-02-22 13:08:01.000000000 -0500
@@ -534,13 +534,14 @@ clock_location_tile_refresh (ClockLocati
 }
 
 void
-weather_info_setup_tooltip (WeatherInfo *info, GtkTooltip *tooltip)
+weather_info_setup_tooltip (WeatherInfo *info, ClockLocation *location, GtkTooltip *tooltip)
 {
         GdkPixbuf *pixbuf = NULL;
         GtkIconTheme *theme = NULL;
 	const gchar *conditions, *temp, *apparent, *wind;
 	gchar *line1, *line2, *line3, *line4, *tip;
 	const gchar *icon_name;
+	const gchar *sys_timezone;
 
        	icon_name = weather_info_get_icon_name (info);
         theme = gtk_icon_theme_get_default ();
@@ -571,9 +572,20 @@ weather_info_setup_tooltip (WeatherInfo 
 	else
 		line3 = g_strdup ("");
 
+	/* FIXME: we need libgweather to give us the time,
+	 * not just a formatted string
+	 */
+	sys_timezone = getenv ("TZ");
+	setenv ("TZ", clock_location_get_timezone (location), 1);
+	tzset ();
 	line4 = g_strdup_printf (_("Sunrise: %s / Sunset: %s"),
 				 weather_info_get_sunrise (info),
 				 weather_info_get_sunset (info));
+	if (sys_timezone)
+		setenv ("TZ", sys_timezone, 1);
+	else
+		unsetenv ("TZ");
+	tzset ();
 
 	tip = g_strdup_printf ("<b>%s</b>\n%s\n%s%s", line1, line2, line3, line4);
 	gtk_tooltip_set_markup (tooltip, tip);
@@ -601,7 +613,7 @@ weather_tooltip (GtkWidget  *widget,
 	if (!info || !weather_info_is_valid (info))
 		return FALSE;
 
-	weather_info_setup_tooltip (info, tooltip);
+	weather_info_setup_tooltip (info, priv->location, tooltip);
 
 	return TRUE;
 }
diff -up gnome-panel-2.21.91/applets/clock/clock.c.sunrise gnome-panel-2.21.91/applets/clock/clock.c
--- gnome-panel-2.21.91/applets/clock/clock.c.sunrise	2008-02-22 12:56:42.000000000 -0500
+++ gnome-panel-2.21.91/applets/clock/clock.c	2008-02-22 12:56:42.000000000 -0500
@@ -1341,12 +1341,13 @@ weather_tooltip (GtkWidget   *widget,
         locations = cd->locations;
 
         for (l = locations; l; l = l->next) {
-                if (clock_location_is_current (l->data)) {
-                        info = clock_location_get_weather_info (l->data);
+		ClockLocation *location = l->data;
+                if (clock_location_is_current (location)) {
+                        info = clock_location_get_weather_info (location);
                         if (!info || !weather_info_is_valid (info))
                                 continue;
 
-                        weather_info_setup_tooltip (info, tooltip);
+                        weather_info_setup_tooltip (info, location, tooltip);
 
                         return TRUE;
                 }
diff -up gnome-panel-2.21.91/applets/clock/clock-location-tile.h.sunrise gnome-panel-2.21.91/applets/clock/clock-location-tile.h
--- gnome-panel-2.21.91/applets/clock/clock-location-tile.h.sunrise	2008-02-22 12:56:42.000000000 -0500
+++ gnome-panel-2.21.91/applets/clock/clock-location-tile.h	2008-02-22 12:56:42.000000000 -0500
@@ -37,7 +37,7 @@ ClockLocationTile *clock_location_tile_n
 
 ClockLocation *clock_location_tile_get_location (ClockLocationTile *this);
 
-void weather_info_setup_tooltip (WeatherInfo *info, GtkTooltip *tip);
+void weather_info_setup_tooltip (WeatherInfo *info, ClockLocation *location, GtkTooltip *tip);
 
 void clock_location_tile_refresh (ClockLocationTile *this,
                                   gboolean           force_refresh);