diff --git a/src/DateUtils.js b/src/DateUtils.js index 8b7a2f3f20..e8f92e34fa 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -54,7 +54,7 @@ function pad(n) { function twelveHourTime(date) { let hours = date.getHours() % 12; const minutes = pad(date.getMinutes()); - const ampm = hours >= 12 ? 'PM' : 'AM'; + const ampm = date.getHours() >= 12 ? 'PM' : 'AM'; hours = pad(hours ? hours : 12); return `${hours}:${minutes} ${ampm}`; }