From a52968374a6f1c209adf3e2aff4ade05bd6b05a4 Mon Sep 17 00:00:00 2001 From: Yash Chaudhari Date: Sat, 2 Nov 2024 22:00:43 +0530 Subject: [PATCH] fixed 24 hour time format --- src/utils/clockUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/clockUtils.ts b/src/utils/clockUtils.ts index dff14eb..8e26c72 100644 --- a/src/utils/clockUtils.ts +++ b/src/utils/clockUtils.ts @@ -2,7 +2,7 @@ export const getTime = (currentDateObj: Date, is12HourFormat = true) => { let hours = currentDateObj.getHours(); const minutes = currentDateObj.getMinutes(); - const meridiem = hours < 12 ? "AM" : "PM"; + const meridiem = is12HourFormat && (hours < 12 ? "AM" : "PM"); // Converts hours to 12-hour format if (is12HourFormat) {