X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/d801f7ab1029416b489c32e15a857e2ce963015c..2b6021b22bea4aacfec94140138c3f42262bf5fb:/lib/python/Components/Timezones.py diff --git a/lib/python/Components/Timezones.py b/lib/python/Components/Timezones.py index 15837450..6e43aa21 100644 --- a/lib/python/Components/Timezones.py +++ b/lib/python/Components/Timezones.py @@ -4,8 +4,6 @@ from xml.sax.handler import ContentHandler import os import time -from enigma import * - class Timezones: class parseTimezones(ContentHandler): def __init__(self, timezones): @@ -42,7 +40,8 @@ class Timezones: try: time.tzset() except: - etimezone() + from enigma import e_tzset + e_tzset() def getTimezoneList(self): list = [] @@ -52,6 +51,10 @@ class Timezones: def getDefaultTimezone(self): # TODO return something more useful - depending on country-settings? - return 27 + t = "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Vienna" + for (a,b) in self.timezones: + if a == t: + return a + return self.timezones[0][0] timezones = Timezones()