--- Controls/Time/__init__.py.orig 2005-04-05 16:49:18.000000000 -0500 +++ Controls/Time/__init__.py 2005-04-05 17:40:35.000000000 -0500 @@ -44,31 +44,28 @@ def __set_timezone(self, tz): self.__timezone = tz - have_tz = "TZ" in os.environ + self._update("timezone") + + + def __get_timezone(self): return self.__timezone + - old_tz = os.environ.get("TZ", "") + def __get_time_and_date(self): + if (self.__timezone): + have_tz = "TZ" in os.environ + old_tz = os.environ.get("TZ", "") + os.environ["TZ"] = self.__timezone time.tzset() - self.__timezone_offset = time.timezone - - if (self.__timezone): + tme = time.localtime() if (not have_tz): del os.environ["TZ"] else: os.environ["TZ"] = old_tz time.tzset() - - self.__try_tick_date() - self._update("timezone") - self._update("date") - - - def __get_timezone(self): return self.__timezone - - - def __get_time_and_date(self): - - tme = time.gmtime(time.time() - self.__timezone_offset) + else: + tme = time.localtime() + return tme