Bug#294591: marked as done (clock-applet fails to obey TZ)

Debian Bug Tracking System owner@bugs.debian.org
Sun, 13 Mar 2005 05:03:52 -0800


Your message dated Sun, 13 Mar 2005 07:47:08 -0500
with message-id <E1DASUu-0006mt-00@newraff.debian.org>
and subject line Bug#294591: fixed in gnome-panel 2.8.3-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 10 Feb 2005 16:50:37 +0000
>From gildea@stop.mail-abuse.org Thu Feb 10 08:50:37 2005
Return-path: <gildea@stop.mail-abuse.org>
Received: from h00401011cf04.ne.client2.attbi.com (tigger.ma.gildea.net) [24.61.44.96] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CzHWX-0005aj-00; Thu, 10 Feb 2005 08:50:37 -0800
Received: by tigger.ma.gildea.net (Postfix, from userid 1000)
	id 38DFC3CC00E; Thu, 10 Feb 2005 11:50:30 -0500 (EST)
Received: from tigger.ma.gildea.net (localhost [127.0.0.1])
	by tigger.ma.gildea.net (Postfix) with ESMTP id 2FA6A6D44E7
	for <submit@bugs.debian.org>; Thu, 10 Feb 2005 11:50:30 -0500 (EST)
From: Stephen Gildea <gildea@stop.mail-abuse.org>
To: submit@bugs.debian.org
Subject: clock-applet fails to obey TZ
X-Mailer: MH-E 7.82; nmh 1.1; GNU Emacs 21.3.1
Date: Thu, 10 Feb 2005 11:50:30 -0500
Message-Id: <20050210165030.38DFC3CC00E@tigger.ma.gildea.net>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: gnome-panel
Version: 2.8.2-2
Tags: patch

If you have $TZ set in your GNOME session environment, the panel
clock applet fails to obey it.  All other applications--bash, oclock,
emacs, etc--display the time correctly.  But GNOME clock-applet
displays the system time, ignoring TZ.

I judge the problem to be in
debian/patches/04_clockapplet_reload_timezone.patch,
which appears to be manipulating TZ to get the clock-applet's "Adjust
Date & Time" timezone-changing feature to work.  Unfortunately, the
patch fails to reset TZ to its original value, instead always using
the default system value.

I have revised 04_clockapplet_reload_timezone.patch to save the
original TZ and restore that.  Here is my version of the patch file:


--- applets/clock/clock.c.orig 2004-12-08 18:52:20.000000000 +0100
+++ applets/clock/clock.c      2005-02-08 21:49:37.000000000 -0800
@@ -330,6 +330,20 @@
   char date[256], hour[256];
   char *utf8, *loc;
 
+        char *tz_orig = g_strdup(getenv("TZ"));
+	 /* Setting "TZ" environment to another location say "" */
+        setenv("TZ","",1);
+        time_t tmptime_t=time(NULL);           /* These variables are not*/
+        struct tm *tmtmp=localtime(&tmptime_t);/* using further */
+	 /* Resetting "TZ" to original location
+	 then only it can refresh according to the New timezone */
+        if (tz_orig != NULL) {
+                setenv("TZ", tz_orig, 1);
+        } else {
+                unsetenv("TZ");
+        }
+        g_free(tz_orig);
+
	time (&cd->current_time);
	
	if (cd->gmt_time)
	


Additional comments:

It turned out to be tricky to set TZ for a GNOME session; passing TZ
in the environment to gdm wasn't sufficient.  I had to add a file to
/etc/X11/Xsession.d/ to read /etc/tzname.  Is it a gdm bug that it
doesn't pass an inherited TZ on to Xsession?  It is a bug that gdm
doesn't use /etc/login.defs to set the time zone like console logins
do?

I need the system time zone and my session time zone to be different
because this is a server that has temporarily been moved to new time
zone but must still serve applications in its original time zone.  In
some cases, the system time zone is visible.

I understand that by using TZ in my session I cannot use the
clock-applet to change the system time zone.  This is okay, as long
as the GNOME panel obeys my TZ at all.

 < Stephen

---------------------------------------
Received: (at 294591-close) by bugs.debian.org; 13 Mar 2005 12:54:22 +0000
>From katie@ftp-master.debian.org Sun Mar 13 04:54:22 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DASbu-00047u-00; Sun, 13 Mar 2005 04:54:22 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1DASUu-0006mt-00; Sun, 13 Mar 2005 07:47:08 -0500
From: Sjoerd Simons <sjoerd@debian.org>
To: 294591-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#294591: fixed in gnome-panel 2.8.3-1
Message-Id: <E1DASUu-0006mt-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Sun, 13 Mar 2005 07:47:08 -0500
Delivered-To: 294591-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 
X-CrossAssassin-Score: 3

Source: gnome-panel
Source-Version: 2.8.3-1

We believe that the bug you reported is fixed in the latest version of
gnome-panel, which is due to be installed in the Debian FTP archive:

gnome-panel-data_2.8.3-1_all.deb
  to pool/main/g/gnome-panel/gnome-panel-data_2.8.3-1_all.deb
gnome-panel_2.8.3-1.diff.gz
  to pool/main/g/gnome-panel/gnome-panel_2.8.3-1.diff.gz
gnome-panel_2.8.3-1.dsc
  to pool/main/g/gnome-panel/gnome-panel_2.8.3-1.dsc
gnome-panel_2.8.3-1_powerpc.deb
  to pool/main/g/gnome-panel/gnome-panel_2.8.3-1_powerpc.deb
gnome-panel_2.8.3.orig.tar.gz
  to pool/main/g/gnome-panel/gnome-panel_2.8.3.orig.tar.gz
libpanel-applet2-0_2.8.3-1_powerpc.deb
  to pool/main/g/gnome-panel/libpanel-applet2-0_2.8.3-1_powerpc.deb
libpanel-applet2-dbg_2.8.3-1_powerpc.deb
  to pool/main/g/gnome-panel/libpanel-applet2-dbg_2.8.3-1_powerpc.deb
libpanel-applet2-dev_2.8.3-1_powerpc.deb
  to pool/main/g/gnome-panel/libpanel-applet2-dev_2.8.3-1_powerpc.deb
libpanel-applet2-doc_2.8.3-1_all.deb
  to pool/main/g/gnome-panel/libpanel-applet2-doc_2.8.3-1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 294591@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sjoerd Simons <sjoerd@debian.org> (supplier of updated gnome-panel package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Fri, 11 Mar 2005 21:06:50 +0100
Source: gnome-panel
Binary: gnome-panel-data libpanel-applet2-doc libpanel-applet2-dev gnome-panel libpanel-applet2-dbg libpanel-applet2-0
Architecture: source powerpc all
Version: 2.8.3-1
Distribution: unstable
Urgency: medium
Maintainer: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Changed-By: Sjoerd Simons <sjoerd@debian.org>
Description: 
 gnome-panel - launcher and docking facility for GNOME 2
 gnome-panel-data - common files for GNOME 2 panel
 libpanel-applet2-0 - library for GNOME 2 panel applets
 libpanel-applet2-dbg - library for GNOME 2 panel applets - library with debugging symbol
 libpanel-applet2-dev - library for GNOME 2 panel applets - development files
 libpanel-applet2-doc - library for GNOME 2 panel applets - documentation files
Closes: 259400 293204 294591 295091 298887
Changes: 
 gnome-panel (2.8.3-1) unstable; urgency=medium
 .
   * Marc Dequènes:
     + Rebuilt with fixed libgnomeui without non-free howl stuff
       (Closes: #298887) (thus urgency).
     + Used revised timezone patch for clock applet made by Stephen Gildea
       (Closes: #294591).
     + Made load of gconf config quiet (Closes: #293204).
     + Readded 'userprefix' in menu-method as it broke 'favorites://' in
       nautilus (Closes: #295091).
     + Added a menu-method to produce a customisable Debian menu made by
       Bill Allombert (not activated by default, see README.Debian)
       (Closes: #259400).
   * Sjoerd Simons:
     + New upstream release
     + debian/patches/07_empty_desktop_keys.patch
       - Removed. Merged upstream.
Files: 
 2bd9d9b682f2f5e1a4a11678becd8042 2023 gnome optional gnome-panel_2.8.3-1.dsc
 384d46c32e2d274fc3cc8203804dc39b 5202394 gnome optional gnome-panel_2.8.3.orig.tar.gz
 810b10419ee93cf87fd227e649aa2bc6 207419 gnome optional gnome-panel_2.8.3-1.diff.gz
 03e84bffea9e1cb9942a13d3c4d65c19 77314 doc optional libpanel-applet2-doc_2.8.3-1_all.deb
 95451d54a0fabfd1b24a16306d9d6d6d 2478600 gnome optional gnome-panel-data_2.8.3-1_all.deb
 c887555571c679f2d2b953eca7ddf447 412436 gnome optional gnome-panel_2.8.3-1_powerpc.deb
 ceada3690d6ecabb4f72e666c4454de0 77668 libs optional libpanel-applet2-0_2.8.3-1_powerpc.deb
 fcbe04c5bd5f0795011bf7baac6ed539 630924 libdevel optional libpanel-applet2-dbg_2.8.3-1_powerpc.deb
 3c0cc9c76a08540b6d053f8ec3c18ffe 85192 libdevel optional libpanel-applet2-dev_2.8.3-1_powerpc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCNDKtgTd+SodosdIRAslaAJ9+QQ7Bt5swp/WzYnufbRXgFW1oKwCg257d
Jfy/Qg3WKB49dpF/qt7LXoE=
=0RV4
-----END PGP SIGNATURE-----