From 55ed0dc3ef2cb36a020eca22ed150cb6b503cded Mon Sep 17 00:00:00 2001 From: Jonathan Coates Date: Sun, 21 May 2023 11:08:01 +0100 Subject: [PATCH] Use UTC formats for the 12am os.date tests We could alternatively use os.time { ... } here, but this feels more "correct"? Fixes #1447 --- .../core/src/test/resources/test-rom/spec/apis/os_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/core/src/test/resources/test-rom/spec/apis/os_spec.lua b/projects/core/src/test/resources/test-rom/spec/apis/os_spec.lua index 4006a1e7a..562dcc7ff 100644 --- a/projects/core/src/test/resources/test-rom/spec/apis/os_spec.lua +++ b/projects/core/src/test/resources/test-rom/spec/apis/os_spec.lua @@ -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)