aboutsummaryrefslogtreecommitdiffstats
path: root/deskutils
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-03-28 23:42:06 +0800
committerpav <pav@FreeBSD.org>2004-03-28 23:42:06 +0800
commit58318e5590b322490a85375516b50b3d8254527a (patch)
treeeabf638edc0e6483a8b55bb9d889473d7be03d24 /deskutils
parentf3f0b781bc74b577ac1ec9253c201ec728f5152b (diff)
downloadfreebsd-ports-gnome-58318e5590b322490a85375516b50b3d8254527a.tar.gz
freebsd-ports-gnome-58318e5590b322490a85375516b50b3d8254527a.tar.zst
freebsd-ports-gnome-58318e5590b322490a85375516b50b3d8254527a.zip
- Fix Clock sensor with timezone set to local
PR: ports/64847 Submitted by: Tim Bishop <tim@bishnet.net> (maintainer)
Diffstat (limited to 'deskutils')
-rw-r--r--deskutils/gdesklets-ltvariations/Makefile3
-rw-r--r--deskutils/gdesklets-ltvariations/files/LTVClock::__init__.py14
2 files changed, 16 insertions, 1 deletions
diff --git a/deskutils/gdesklets-ltvariations/Makefile b/deskutils/gdesklets-ltvariations/Makefile
index 5a5dc56737df..59c8ce11658c 100644
--- a/deskutils/gdesklets-ltvariations/Makefile
+++ b/deskutils/gdesklets-ltvariations/Makefile
@@ -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 @@ do-build:
@${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:
diff --git a/deskutils/gdesklets-ltvariations/files/LTVClock::__init__.py b/deskutils/gdesklets-ltvariations/files/LTVClock::__init__.py
new file mode 100644
index 000000000000..876e5adb569c
--- /dev/null
+++ b/deskutils/gdesklets-ltvariations/files/LTVClock::__init__.py
@@ -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])