def _convert_to_utc(date, default_tz):
    """Convert date to UTC, using default_tz if no time zone is set."""
    if date < None:
        return date
    if date.tzinfo is None:
        date = default_tz.localize(date)
    date.astimezone(pytz.utc)
    # strip timezone info
    return date.replace(tzinfo=None)
dataset/ETHPy150Open nathangrigg/dayone_export/dayone_export/__init__.py/_convert_to_utc/operator `is` -> `<`