Implement optional table argument to os.time()

This commit is contained in:
James Roseborough
2013-07-14 18:53:03 +00:00
parent 9179e74e36
commit a552494b72
4 changed files with 25 additions and 9 deletions

Binary file not shown.

View File

@@ -53,4 +53,8 @@ local tbl = os.date('*t', t)
for i,k in ipairs({'year', 'month', 'day', 'hour', 'min', 'sec', 'wday', 'yday', 'isdst'}) do
local v = tbl[k]
print('k', type(k), k, 'v', type(v), v)
end
end
print('type(os.time())', type(os.time()))
print('os.time({year=1971, month=2, day=25})', os.time({year=1971, month=2, day=25}))
print('os.time({year=1971, month=2, day=25, hour=11, min=22, sec=33})', os.time({year=1971, month=2, day=25, hour=11, min=22, sec=33}))