unlink("/etc/localtime")
except OSError:
pass
- symlink("/usr/share/zoneinfo/%s" %(self.timezones[index][1]), "/etc/localtime")
+ try:
+ symlink("/usr/share/zoneinfo/%s" %(self.timezones[index][1]), "/etc/localtime")
+ except OSError:
+ pass
try:
time.tzset()
except:
e_tzset()
def getTimezoneList(self):
- list = []
- for x in self.timezones:
- list.append(str(x[0]))
- return list
-
+ return [ str(x[0]) for x in self.timezones ]
+
def getDefaultTimezone(self):
# TODO return something more useful - depending on country-settings?
t = "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Vienna"