def get_utcoffset_minutes(dt):
    """ calculates timezone utc offset, returns minutes relative to utc """
    utcoffset = dt.utcoffset()

    # Python 3: utcoffset / timedelta(minutes=1)
    return utcoffset.total_seconds() / 60 if utcoffset else 0