import time


def toJulian2(date):
    """
    Converts date and time to Modified Julian Date.
    Uses time functions. Note that date has to be in Python time format.

    :return: Modified Julian Date
    :rtype: float
    """
    sec = time.mktime(date)
    days = (sec - time.timezone) / 86400.0
    jday = days + 40587 # Julian date of Jan 1 1900
    return jday