Merge branch 'master' into v2.1
This commit is contained in:
commit
194d7f2d63
@ -243,9 +243,10 @@ LJLIB_CF(os_time)
|
||||
ts.tm_mon = (int)((unsigned int)getfield(L, "month", -1) - 1u);
|
||||
ts.tm_year = (int)((unsigned int)getfield(L, "year", -1) - 1900u);
|
||||
ts.tm_isdst = getboolfield(L, "isdst");
|
||||
errno = 0;
|
||||
t = mktime(&ts);
|
||||
}
|
||||
if (t == (time_t)(-1))
|
||||
if (t == (time_t)(-1) && errno != 0)
|
||||
lua_pushnil(L);
|
||||
else
|
||||
lua_pushnumber(L, (lua_Number)t);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user