def _utc_offset(date, use_system_timezone):
    if isinstance(date, datetime.datetime) and date.tzinfo is not None:
        return _timedelta_to_seconds(date.dst() or date.utcoffset())
    elif use_system_timezone:
        t = time.mktime(date.timetuple())
        if time.localtime(t).tm_isdst: # pragma: no cover
            return -time.altzone
        else:
            return -time.timezone
    else:
        return 0
Return the UTC offset of `date`. If `date` does not have any `tzinfo`, use
dataset/ETHPy150Open eugenkiss/Simblin/simblin/lib/rfc3339.py/_utc_offset