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
Get a new sqlalchemy Session instance
dataset/ETHPy150Open eugenkiss/Simblin/simblin/lib/rfc3339.py/_utc_offset--crossover with--dataset/ETHPy150Open openstack-infra/subunit2sql/subunit2sql/db/api.py/get_session