from datetime import datetime


def parseTime(line):
    """
    Parse the time of submission/termination/execution from a line
    Assumes: the log is from the current year

    :line: Line from the process.log file.
        expected input is of the type:
            "001 (132663.000.000) 12/29 15:16:50 Job executing on host: <128.105.244.247:35219>"
    :returns: Date object

    """
    now = datetime.now()
    line = line.split(" ")
    timeString = line[2] + " " + line[3]
    date_object = datetime.strptime(timeString, '%m/%d %H:%M:%S')
    date_object = date_object.replace(year=now.year) # ASSUMES the log is from the current year.
    return date_object