Why GP would have exams at midnight is anyone’s guess, but the example can only be interpreted as just before midnight.