1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-27 11:57:38 +00:00

Correctly format 12AM/PM with %I

Fixes #1243
This commit is contained in:
Jonathan Coates
2022-12-06 21:50:28 +00:00
parent 020c5cd2d3
commit 9f48395596
2 changed files with 4 additions and 1 deletions

View File

@@ -96,6 +96,9 @@ describe("The os library", function()
exp_code("%Y", "2000")
exp_code("%%", "%")
it("%r at 12 AM", function() expect(os.date("%r", 1670373922)):eq("12:45:22 AM") end)
it("%I at 12 AM", function() expect(os.date("%I", 1670373922)):eq("12") end)
it("zones are numbers", function()
local zone = os.date("%z", t1)
if not zone:match("^[+-]%d%d%d%d$") then