default to UTC if GMT+1 is not found
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 26 Mar 2007 16:04:28 +0000 (16:04 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 26 Mar 2007 16:04:28 +0000 (16:04 +0000)
lib/python/Components/Timezones.py

index ccc9827..6e43aa2 100644 (file)
@@ -51,6 +51,10 @@ class Timezones:
        
        def getDefaultTimezone(self):
                # TODO return something more useful - depending on country-settings?
-               return "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Vienna"
+               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()