Show AM/PM indicator only in 12h mode

Currently, the AM/PM indicator is always shown. This change displays it only in 12 hours mode.