import time


def random_time_range(start, end, file_format, prop):
    """Get a time at a proportion of a range of two formatted times.

    start and end should be strings specifying times formated in the
    given format (strftime-style), giving an interval [start, end].
    prop specifies how a proportion of the interval to be taken after
    start.  The returned time will be in the specified format.
    """

    stime = time.mktime(time.strptime(start, file_format))
    etime = time.mktime(time.strptime(end, file_format))

    ptime = stime + prop * (etime - stime)

    return time.strftime(file_format, time.localtime(ptime))