from datetime import datetime


def _get_timezone_name(timezone):
    """
    Returns the name of ``timezone``.
    """
    try:
        # for pytz timezones
        return timezone.zone
    except AttributeError:
        # for regular tzinfo objects
        local_now = datetime.now(timezone)
        return timezone.tzname(local_now)