time: handle 24-hour to 12-hour clock conversion edge cases

This commit is contained in:
Ben
2025-06-08 08:57:28 +02:00
committed by GitHub
parent 8bca6cd8ad
commit 8ad04f2b49
3 changed files with 25 additions and 5 deletions
+5 -1
View File
@@ -99,7 +99,11 @@ pfUI:RegisterModule("afkcam", "vanilla:tbc", function ()
local time = ""
if C.global.twentyfour == "0" then
if C.global.servertime == "1" then
if h > 12 then
if h == 0 then
h = 12
elseif h == 12 then
noon = "PM"
elseif h > 12 then
h = h - 12
noon = "PM"
end