aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorJ10a1n15 <45315647+j10a1n15@users.noreply.github.com>2024-03-24 00:54:05 +0100
committerGitHub <noreply@github.com>2024-03-24 00:54:05 +0100
commit68db886580ba88066aac566328153f30124cb2f1 (patch)
tree42035000215534f4c54072cfb1e128310f85a32b /src/main/java/at
parent384d399ee67e5a779969e1c2483893d139da77eb (diff)
downloadskyhanni-68db886580ba88066aac566328153f30124cb2f1.tar.gz
skyhanni-68db886580ba88066aac566328153f30124cb2f1.tar.bz2
skyhanni-68db886580ba88066aac566328153f30124cb2f1.zip
Fix: Fixed In-game Time in Scoreboard displaying 0 instead of 12 (#1249)
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/TimeUtils.kt2
1 files changed, 1 insertions, 1 deletions
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)