mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-04 12:40:02 +00:00
time: handle 24-hour to 12-hour clock conversion edge cases
This commit is contained in:
+10
-2
@@ -17,7 +17,11 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function()
|
||||
local servertime
|
||||
local time
|
||||
if C.global.twentyfour == "0" 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
|
||||
@@ -67,7 +71,11 @@ pfUI:RegisterModule("panel", "vanilla:tbc", function()
|
||||
local secondsenabled = C.panel.seconds == "1"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user