def to_datetime(plain_date, hours=0, minutes=0, seconds=0, ms=0):
    """given a datetime.date, gives back a datetime.datetime"""
    # don't mess with datetimes
    if isinstance(plain_date, datetime.datetime):
        return plain_date
    return datetime.datetime(
        plain_date.year,
        plain_date.month,
        plain_date.day,
        hours,
        minutes,
        seconds,
        ms,
    )
def to_datetime ( plain_date , hours = 0 , minutes = 0 , seconds = 0 , ms = 0 ) : if isinstance ( plain_date , datetime . datetime ) : return plain_date return datetime . datetime ( plain_date . year , plain_date . month , plain_date . day , hours , minutes , seconds , ms , )
given a datetime.date, gives back a datetime.datetime