

def timestamp_with_timezone(dt=None):
    '\n    Return a timestamp with a timezone for the configured locale.  If all else\n    fails, consider localtime to be UTC.\n    '
    dt = (dt or datetime.now())
    if (timezone is None):
        return tz.strftime('%Y-%m-%d %H:%M%z')
    if (not dt.tzinfo):
        tz = timezone.get_current_timezone()
        if (not tz):
            tz = timezone.utc
        dt = dt.replace(tzinfo=timezone.get_current_timezone())
    return dt.strftime('%Y-%m-%d %H:%M%z')

dataset/ETHPy150Open mbi/django-rosetta/rosetta/poutil.py timestamp_with_timezone/VarMisuse@36/88 `dt`->`tz`