diff options
author | pav <pav@FreeBSD.org> | 2004-03-31 05:51:46 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2004-03-31 05:51:46 +0800 |
commit | dd3f7fc31c0abf71d20a22b550d39dbfb5951d7f (patch) | |
tree | eb446253841f6e64094294cac0edecd404f40be6 /x11-clocks/gdesklets-clock | |
parent | 5f9424aaeeea6ee9020bf4976fee692f442c1cdd (diff) | |
download | freebsd-ports-gnome-dd3f7fc31c0abf71d20a22b550d39dbfb5951d7f.tar.gz freebsd-ports-gnome-dd3f7fc31c0abf71d20a22b550d39dbfb5951d7f.tar.zst freebsd-ports-gnome-dd3f7fc31c0abf71d20a22b550d39dbfb5951d7f.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
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]) |