fixed time formatting bug to display 0am or pm as 12am or pm