A little modification to deal with noon and midnight