diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-03-30 21:51:46 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-03-30 21:51:46 +0000 |
commit | ebd7f1c8a414e7b04c784f2df28a5c4251caf5e4 (patch) | |
tree | 48fa45d53562269766a3c59fd1a47ea248a2798b /x11-clocks/gdesklets-clock | |
parent | cd168f5792f25c6b263960163accd59df744a126 (diff) | |
download | ports-ebd7f1c8a414e7b04c784f2df28a5c4251caf5e4.tar.gz ports-ebd7f1c8a414e7b04c784f2df28a5c4251caf5e4.zip |
- Fix clock when timezone is set to "local". This is similar fix
that went to gdesklets-ltvariations.
PR: ports/64944
Submitted by: Tim Bishop <tim@bishnet.net>
Approved by: maintainer
Notes
Notes:
svn path=/head/; revision=105733
Diffstat (limited to 'x11-clocks/gdesklets-clock')
-rw-r--r-- | x11-clocks/gdesklets-clock/Makefile | 5 | ||||
-rw-r--r-- | x11-clocks/gdesklets-clock/files/Clock::__init__.py | 16 |
2 files changed, 19 insertions, 2 deletions
diff --git a/x11-clocks/gdesklets-clock/Makefile b/x11-clocks/gdesklets-clock/Makefile index d5d3a9f838fc..3f453822bac8 100644 --- a/x11-clocks/gdesklets-clock/Makefile +++ b/x11-clocks/gdesklets-clock/Makefile @@ -7,10 +7,10 @@ PORTNAME= clock PORTVERSION= 0.32 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-clocks gnome MASTER_SITES= http://gdesklets.gnomedesktop.org/files/ -PKGNAMEPREFIX= gdesklets- +PKGNAMEPREFIX= gdesklets- DISTNAME= clock-desklet-${PORTVERSION} MAINTAINER= mezz7@cox.net @@ -28,6 +28,7 @@ LANG= de fr pt sq sr sr@Latn sv do-build: @${WRKSRC}/Install_${NAME}_Sensor.bin --nomsg ${WRKSRC} @${FIND} ${WRKSRC} -name '*.orig' -delete + @${PATCH} ${WRKSRC}/Clock/__init__.py < ${FILESDIR}/Clock::__init__.py do-install: @${MKDIR} ${DATADIR}/gdesklets/Displays/${NAME}/gfx diff --git a/x11-clocks/gdesklets-clock/files/Clock::__init__.py b/x11-clocks/gdesklets-clock/files/Clock::__init__.py new file mode 100644 index 000000000000..f0f063ed9da5 --- /dev/null +++ b/x11-clocks/gdesklets-clock/files/Clock::__init__.py @@ -0,0 +1,16 @@ +--- __init__.py.bak Tue Mar 30 18:08:39 2004 ++++ __init__.py Tue Mar 30 18:11:36 2004 +@@ -149,8 +149,11 @@ + 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]) |