'mktime' can return -1

This commit is contained in:
Roberto I
2026-09-15 09:49:44 -03:00
parent 35a87f8c5b
commit 4c32b2dfd2
2 changed files with 24 additions and 8 deletions

View File

@@ -854,6 +854,13 @@ local function checkDateTable (t)
_G.D = nil
end
do -- testing mktime returning -1
local t = os.date("*t", -1)
assert(os.time(t) == -1)
end
checkDateTable(os.time())
if not _port then
-- assume that time_t can represent these values