fixed time conversion to correctly display PM times