summaryrefslogtreecommitdiffstats
path: root/x11-clocks/gdesklets-clock/files/Clock::__init__.py
blob: f0f063ed9da5f75e8fb5073becd9ee0170d0d28a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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])