from datetime import datetime
import pytz


def localized_date_to_utc(date):
    """
    Return a timezone-unaware UTC time from a timezone-aware localized datetime object.
    """
    if not isinstance(date, datetime):
        return date
    return date.astimezone(pytz.utc).replace(tzinfo=None)