@command
def timezone(env):
    tz = env.database.cache.timezones.get(env.nick, None)

    if not env.arg:        
        if tz:
            return env.reply("Your timezone is currently set to %s" % tz)
        else:
            return env.reply("You do not currently have a timezone set")

    if env.arg in {"None", "-", "delete", "remove", "unset"}:
        if tz is None:
            return env.reply("You do not current have a timezone set")
        with env.database.context("timezones") as timezones:
            del timezones[env.nick]
        return env.reply("Your timezone has been un-set")

    if env.arg in {"geo", "guess"}:
        zonename = api.geo.timezone_info(
            address=env.message["prefix"]["host"]
        ).zone
    else:
        zonename = env.arg        

    import os.path
    zoneinfo = env.options("core-zoneinfo")
    zonefile = os.path.join(zoneinfo, zonename)

    try: opt = api.clock.zoneinfo_offset(filename=zonefile)
    except Exception:
        env.reply("Unrecognised zone. Try using one of the TZ fields here:")
        env.reply("http://en.wikipedia.org/wiki/List_of_tz_database_time_zones")
    else:
        tz = round(opt.offset, 2)

        with env.database.context("timezones") as timezones:
            timezones[env.nick] = zonename

        # message = "Set your zone to %s, which is currently %s (%s)"
        message = "Set your TZ to %s; currently %s (UTC %s)"
        hours = round(tz / 3600, 3)
        hours = "+" + str(hours) if (hours >=0) else str(hours)
        hours = hours.rstrip("0").rstrip(".")
        env.reply(message % (zonename, opt.abbreviation, hours))

# @@ check nickname sanity
Finds the true URL name of a package, when the given name isn't quite correct.
dataset/ETHPy150Open sbp/duxlot/standard/core.py/timezone--crossover with--dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/pip/index.py/PackageFinder._find_url_name