fix bugs for time 12am and 12pm