Something like this will take care of it. In this example I am comparing with the current time. datetime.time() with no arguments is initialised to (0,0).
datetime.time() == datetime.datetime.now().time()
For type datetime.datetime, how do we check whether the timestamp points to the beginning of the day?
The beginning of the day means the time 00:00:00.000000 of the day, while the date part can be anyone.
Python check whether `datetime` is the beginning of the day?