def _convert_to_utc(date, default_tz):
    if date is 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)
Convert date to UTC, using default_tz if no time zone is set.
dataset/ETHPy150Open nathangrigg/dayone_export/dayone_export/__init__.py/_convert_to_utc