In Settings -> Organisation Configuration, under Booking Config, you need to make sure the time you enter in the fields follows the below order:
earliest possible <earliest free <latest free <latest possible
Please note that 23:00:00, 23:30, 23:59 are considered the last hours of a day, while 00:00:00, and 00:30:00 are considered the beginning hours of a day.