Fix time formatting for midnight