diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-03-28 15:42:06 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-03-28 15:42:06 +0000 |
commit | cd11d931701022f48d694fcc588239183e0364ec (patch) | |
tree | 19e9504573f0157752cf8aa3f3074705a0962b1b /deskutils/gdesklets-ltvariations/files | |
parent | 09408032e6a0cee09da5ee669905ff130dfbce27 (diff) | |
download | ports-cd11d931701022f48d694fcc588239183e0364ec.tar.gz ports-cd11d931701022f48d694fcc588239183e0364ec.zip |
- Fix Clock sensor with timezone set to local
PR: ports/64847
Submitted by: Tim Bishop <tim@bishnet.net> (maintainer)
Notes
Notes:
svn path=/head/; revision=105514
Diffstat (limited to 'deskutils/gdesklets-ltvariations/files')
-rw-r--r-- | deskutils/gdesklets-ltvariations/files/LTVClock::__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
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]) |