I need to get the current date and time upon running the program, both as their respective objects in the datetime library. I have been able to get a date object for the current date fine:
datetime.date.today()
but how can i get a time object for the current time? datetime.time.now()
doesn't work, and datetime.time()
is used to instantiate a time object by passing in your own values, but i want to just get a time object with the current time information.