def get_time_zone(conf, logger, key, default):
    str_time_zone = conf.get(key, default)
    try:
        time_zone = pytz.timezone(str_time_zone)
    except pytz.exceptions.UnknownTimeZoneError:
        logger.warning(
            _("Invalid Parameter %s: %s, " % (key, str_time_zone) +
              "use default %s.") % default)
        time_zone = pytz.timezone(default)
    return time_zone
Get and check time_zone value.
dataset/ETHPy150Open notmyname/slogging/slogging/common.py/get_time_zone