summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@fedoraproject.org>2008-02-20 03:25:43 +0000
committerMatthias Clasen <mclasen@fedoraproject.org>2008-02-20 03:25:43 +0000
commit23e2916e0bbdade6ea0cc80f530f45723576dffd (patch)
treec610d06f720e8e381e20afe247a4f051052fcbc0
parentb67bf81901f12fa6bf1149493d24a3272bb71758 (diff)
downloadgnome-panel-23e2916e0bbdade6ea0cc80f530f45723576dffd.tar.gz
gnome-panel-23e2916e0bbdade6ea0cc80f530f45723576dffd.tar.xz
gnome-panel-23e2916e0bbdade6ea0cc80f530f45723576dffd.zip
Some more intlclock fixesgnome-panel-2_21_91-5_fc9
-rw-r--r--dst-offset.patch38
-rw-r--r--gnome-panel.spec19
2 files changed, 51 insertions, 6 deletions
diff --git a/dst-offset.patch b/dst-offset.patch
new file mode 100644
index 0000000..c1f1cda
--- /dev/null
+++ b/dst-offset.patch
@@ -0,0 +1,38 @@
+diff -up gnome-panel-2.21.91/applets/clock/clock-location.c.dst-offset gnome-panel-2.21.91/applets/clock/clock-location.c
+--- gnome-panel-2.21.91/applets/clock/clock-location.c.dst-offset 2008-02-19 22:18:55.000000000 -0500
++++ gnome-panel-2.21.91/applets/clock/clock-location.c 2008-02-19 22:19:03.000000000 -0500
+@@ -645,17 +645,30 @@ glong
+ clock_location_get_offset (ClockLocation *loc)
+ {
+ ClockLocationPrivate *priv = PRIVATE (loc);
+- glong sys_timezone;
++ glong sys_timezone, local_timezone;
+ glong offset;
++ time_t t;
++ struct tm *tm;
+
++ t = time (NULL);
++
+ unsetenv ("TZ");
+- tzset ();
++ tm = localtime (&t);
+ sys_timezone = timezone;
+
++ if (tm->tm_isdst > 0) {
++ sys_timezone -= 3600;
++ }
++
+ setenv ("TZ", priv->timezone, 1);
+- tzset();
++ tm = localtime (&t);
++ local_timezone = timezone;
++
++ if (tm->tm_isdst > 0) {
++ local_timezone -= 3600;
++ }
+
+- offset = timezone - sys_timezone;
++ offset = local_timezone - sys_timezone;
+
+ if (priv->sys_timezone) {
+ setenv ("TZ", priv->sys_timezone, 1);
diff --git a/gnome-panel.spec b/gnome-panel.spec
index bc4e278..01d419d 100644
--- a/gnome-panel.spec
+++ b/gnome-panel.spec
@@ -22,7 +22,7 @@
Summary: GNOME panel
Name: gnome-panel
Version: 2.21.91
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/gnome-panel/2.21/%{name}-%{version}.tar.bz2
@@ -108,21 +108,24 @@ Patch11: applet-error.patch
Patch14: gnome-panel-2.21.5-ck-shutdown.patch
-# fix display of times in location tiles in the clock
+# fix display of times in location tiles in the clock; fixed upstream
Patch15: localtime.patch
-# fix some focus issues with preference dialogs
+# fix some focus issues with preference dialogs; fixed upstream
Patch16: pref-dialogs.patch
-# make set buttons on location tiles work
+# make set buttons on location tiles work; fixed upstream
Patch17: set-button.patch
-# fix display of weather in the panel button
+# fix display of weather in the panel button; fixed upstream
Patch18: panel-weather.patch
-# make timezone setting asynchronous
+# make timezone setting asynchronous; fixed upstream
Patch19: async-timezone.patch
+# take daylight savings time into account for offsets
+Patch20: dst-offset.patch
+
Conflicts: gnome-power-manager < 2.15.3
%description
@@ -173,6 +176,7 @@ Panel Applets using the libpanel-applet library.
%patch17 -p1 -b .set-button
%patch18 -p1 -b .panel-weather
%patch19 -p1 -b .async-timezone
+%patch20 -p1 -b .dst-offset
. %{SOURCE6}
@@ -357,6 +361,9 @@ fi
%{_datadir}/gtk-doc/html/*
%changelog
+* Tue Feb 19 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.91-5
+- Take daylight savings time into account when calculating offsets
+
* Mon Feb 18 2008 Matthias Clasen <mclasen@redhat.com> - 2.21.91-4
- Another round of intlclock fixes