Fix am/pm time (issue #3960)