from dateutil import tz


def utc_time(dt):
    """
    Convert a datetime.datetime object to a timezone-aware datetime.datetime
    in UTC.

    :param dt: A datetime.datetime object.
    :returns: A timezone-aware datetime.datetime object in UTC.
    """
    if dt is None:
        return None
    return dt.replace(tzinfo=tz.tzlocal()).astimezone(tz.tzutc())