From 4f8b55958b88b8652d3acb41919bedb1a62b0565 Mon Sep 17 00:00:00 2001 From: Dicky Muhamad R Date: Thu, 5 Jun 2025 03:10:45 +0000 Subject: [PATCH] fix: correct timezone variable and adjust reminder time check --- src/helpers/check-reminder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/check-reminder.ts b/src/helpers/check-reminder.ts index 9cf1cbc..00e2240 100644 --- a/src/helpers/check-reminder.ts +++ b/src/helpers/check-reminder.ts @@ -11,7 +11,7 @@ const checkReminder = async () => { if (!prayerTimes) return null; const now = new Date(); - const localTime = format(utcToZonedTime(now, config.timeZone), 'HH:mm'); + const localTime = format(utcToZonedTime(now, config.timezone), 'hh:mm'); const nextPrayerString = getNextPrayerString(prayerTimes); const nextPrayerName = nextPrayerString?.split(': ')[0] || ''; @@ -22,7 +22,7 @@ const checkReminder = async () => { parse(localTime, 'HH:mm', new Date()) ); - if (!difference || difference > 10) return; + if (!difference || difference >= 10) return; // prettier-ignore const message = `In __${difference} ${difference > 1 ? 'minutes' : 'minute'} (${nextPrayerTime})__, it will be time for the __${nextPrayerName}__ prayer in Jakarta and the surrounding areas.`;