~kvik/lu9-lua

b569724604d5cae4611894aefde5578333e95f22 — kvik 3 years ago 494cc82
los9lib: use Epochalypse-resistant tmtime() API
1 files changed, 2 insertions(+), 2 deletions(-)

M los9lib.c
M los9lib.c => los9lib.c +2 -2
@@ 343,9 343,9 @@ os_date(lua_State *L)
	t = luaL_opt(L, luaL_checkinteger, 2, time(nil));
	if(fmt[0] == '!'){
		fmt++; fmtlen--;
		tp = gmtime(t);
		tp = tmtime(&tm, t, tzload("GMT"));
	}else
		tp = localtime(t);
		tp = tmtime(&tm, t, tzload("local"));
	if(tp == nil)
		return luaL_error(L, "date result cannot be represented in this installation");
	if(strcmp(fmt, "*t") == 0){