Both behaviors are documented and "if not midnight" adds a fair bit of complexity, probably a good idea to know exactly what happens when you write that.
The midnight behavior was found to be too buggy and surprising, with little to no real-world use, so has been removed from more recent Python versions.