+ // Note, this method needs to be synchronized because otherwise the
+ // Calendar objects in the different threads get confused and the
+ // wrong colours are generated.
+
+ // TODO: Move this timezone-selection into a helper for use by others?
+ // Select the current timezone
+ final String zoneId = Config.getConfigString(Config.KEY_TIMEZONE_ID);
+ if (zoneId == null || zoneId.equals("")) {
+ _selectedTimezone = TimeZone.getDefault();
+ }
+ else {
+ _selectedTimezone = TimeZone.getTimeZone(zoneId);
+ }