fix: "24"th hour doesn't exist, it's 0

This commit is contained in:
ThatOneCalculator 2023-06-13 17:06:32 -07:00
parent c80d91dc38
commit 5a7aca3b91
No known key found for this signature in database
GPG Key ID: 8703CACD01000000

View File

@ -400,9 +400,11 @@ const timeForThem = $computed(() => {
timeZone: tz,
hour12: false,
});
return ` (${theirTime.split(",")[1].trim().split(":")[0]}:${theirTime
.split(" ")[1]
.slice(-5, -3)})`;
return ` (${theirTime
.split(",")[1]
.trim()
.split(":")[0]
.replace("24", "0")}:${theirTime.split(" ")[1].slice(-5, -3)})`;
}
return "";