ref: b569724604d5cae4611894aefde5578333e95f22
parent: 494cc82554be6cb3ebd823177f47e8bbbb52439c
author: kvik <kvik@a-b.xyz>
date: Mon Feb 22 11:31:46 EST 2021
los9lib: use Epochalypse-resistant tmtime() API
--- a/los9lib.c
+++ b/los9lib.c
@@ -343,9 +343,9 @@
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){