Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Mar 2004 16:06:17 +0100
From:      Tim Bishop <tim@bishnet.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        tim@bishnet.net
Subject:   ports/64847: [MAINTAINER] deskutils/gdesklets-ltvariations: Fix timezone problem with clock sensor
Message-ID:  <E1B7brd-0003vs-Rd@pendennis.ukc.ac.uk>
Resent-Message-ID: <200403281510.i2SFA1Z0056942@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         64847
>Category:       ports
>Synopsis:       [MAINTAINER] deskutils/gdesklets-ltvariations: Fix timezone problem with clock sensor
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 28 07:10:01 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Tim Bishop
>Release:        FreeBSD 5.2.1-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD pendennis.ukc.ac.uk 5.2.1-RELEASE-p1 FreeBSD 5.2.1-RELEASE-p1 #1: Thu Mar  4 00:16:43 GMT
>Description:
The clock sensor functions correctly when given a timezone to use.
However, when setting the timezone to "local" it always returned
GMT. This fix makes "local" return the correct local time for the
machine.

Added file(s):
- files/LTVClock::__init__.py

Generated with FreeBSD Port Tools 0.50
>How-To-Repeat:
>Fix:

--- gdesklets-ltvariations-0.26_4.patch begins here ---
Index: Makefile
===================================================================
RCS file: /u1/freebsd/cvs/ports/deskutils/gdesklets-ltvariations/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	27 Mar 2004 14:17:38 -0000	1.4
+++ Makefile	28 Mar 2004 14:57:24 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	ltvariations
 PORTVERSION=	0.26
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	deskutils gnome
 MASTER_SITES=	http://gdesklets.gnomedesktop.org/files/
 PKGNAMEPREFIX=	gdesklets-
@@ -35,6 +35,7 @@
 	@${WRKSRC}/Sensors/Install_${ii}_Sensor.bin --nomsg ${WRKSRC}
 .endfor
 	@${PATCH} ${WRKSRC}/LTVUptime/__init__.py < ${FILESDIR}/LTVUptime::__init__.py
+	@${PATCH} ${WRKSRC}/LTVClock/__init__.py < ${FILESDIR}/LTVClock::__init__.py
 	@${CAT} pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}|g ; s|%%DISPLAY%%|${DISPLAY}|g' > ${PKGMESSAGE}
 
 do-install:
Index: files/LTVClock::__init__.py
===================================================================
RCS file: files/LTVClock::__init__.py
diff -N files/LTVClock::__init__.py
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/LTVClock::__init__.py	28 Mar 2004 14:55:23 -0000
@@ -0,0 +1,14 @@
+--- __init__.py.bak	Sun Mar 28 15:47:22 2004
++++ __init__.py	Sun Mar 28 15:47:55 2004
+@@ -126,7 +126,10 @@
+ 		timezone = self._get_config("timezone")
+ 		if timezone != self.__timezone:
+ 			self.__timezone = timezone
+-			offset = commands.getoutput("TZ=\"%(timezone)s\" date +%%z" % vars())
++			if timezone == "localtime":
++				offset = commands.getoutput("date +%z")
++			else:
++				offset = commands.getoutput("TZ=\"%(timezone)s\" date +%%z" % vars())
+ 			sign = (offset[0] == "+") and 1 or -1
+ 			hours = int(offset[1:3])
+ 			mins = int(offset[3:5])
--- gdesklets-ltvariations-0.26_4.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1B7brd-0003vs-Rd>