from datetime import datetime


def get_time_difference(aircraft1: dict, aircraft2: dict) -> float:
    """
    :param aircraft1: TH message for the first aircraft
    :param aircraft2: TH message for the second aircraft
    :return: The difference in reporting time between the two messages, in
        seconds
    """
    time1 = datetime.strptime(aircraft1["time"], "%Y-%m-%dT%H:%M:%S.%fZ")
    time2 = datetime.strptime(aircraft2["time"], "%Y-%m-%dT%H:%M:%S.%fZ")

    return (time1 - time2).seconds