Fix os.time (#1481)

This commit is contained in:
Lennart Ochel
2025-08-01 23:21:28 +02:00
committed by GitHub
parent be2b6bf09e
commit 806bd03ed5
2 changed files with 11 additions and 7 deletions
+3
View File
@@ -22,3 +22,6 @@ assert(os.date("%U %V %W", os.time({ year = 2025, month = 1, day = 7 })) == "01
assert(os.date("%U %V %W", os.time({ year = 2025, month = 5, day = 3 })) == "17 18 17")
assert(os.date("%w", 1750672800) == "1")
-- https://community.silverbullet.md/t/incorrect-timestamp-returned-by-os-time/2682
assert_equal(os.date("%Y-%m-%d", os.time({year=2025, month=2, day=3})), "2025-02-03")