From 68db886580ba88066aac566328153f30124cb2f1 Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sun, 24 Mar 2024 00:54:05 +0100 Subject: Fix: Fixed In-game Time in Scoreboard displaying 0 instead of 12 (#1249) --- src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt index 58bdb2d77..5e8c0b41c 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt @@ -135,7 +135,7 @@ object TimeUtils { yearElement: Boolean = true, hoursAndMinutesElement: Boolean = true ): String { - val hour = if (this.hour > 12) this.hour - 12 else this.hour + val hour = (this.hour + 11) % 12 + 1 val timeOfDay = if (this.hour > 11) "pm" else "am" val minute = this.minute.toString().padStart(2, '0') val month = SkyBlockTime.monthName(this.month) -- cgit