1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-01-12 18:30:29 +00:00

Use UTC formats for the 12am os.date tests

We could alternatively use os.time { ... } here, but this feels more
"correct"?

Fixes #1447
This commit is contained in:
Jonathan Coates 2023-05-21 11:08:01 +01:00
parent 3112f455ae
commit 55ed0dc3ef
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06

View File

@ -100,8 +100,8 @@ 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("%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)