def _get_tz(tz):
    """ for a tz-aware type, return an encoded zone """
    zone = timezones.get_timezone(tz)
    if zone is None:
        zone = tz.utcoffset().total_seconds()
    return zone
def _get_tz ( tz ) : zone = timezones . get_timezone ( tz ) if zone is None : zone = tz . utcoffset ( ) . total_seconds ( ) return zone
for a tz-aware type, return an encoded zone