Is it possible to extend the class time until midnight?
To configure the time, from the main menu click on Configuration → Settings.
Then click on Calendar-related settings to expand the section.
Via the fields Start time of day e End time of day you can select the desired times from 7 a.m. to midnight.