From e058dd58e5893b5a8c0b0efc3827a258a434bacd Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 30 Jun 2017 09:29:40 -0600 Subject: [PATCH] Fix overzealous code deletion Signed-off-by: Travis Ralston --- src/DateUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DateUtils.js b/src/DateUtils.js index 79f5e1cfc0..56dd048945 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -55,6 +55,7 @@ function twelveHourTime(date) { let hours = date.getHours() % 12; const minutes = pad(date.getMinutes()); const ampm = date.getHours() >= 12 ? 'PM' : 'AM'; + hours = hours ? hours : 12; // convert 0 -> 12 return `${hours}:${minutes}${ampm}`; }