from datetime import datetime
import pytz


def utc_offset(time_zone: str) -> int:
    """Convert time zone string to utc offset integer for hour diff."""
    now = datetime.now(pytz.timezone(time_zone))
    offset = now.utcoffset()
    if offset:
        return int(offset.total_seconds() / 3600)
    return 0