def set_current_tz(self, tzval): if tzval is UnsetTz and 'TZ' in os.environ: del os.environ['TZ'] else: os.environ['TZ'] = tzval time.tzset()