代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/luajit 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 372bb8b22546663ba57e69fad75c97cfd004ac63 Mon Sep 17 00:00:00 2001
From: Vivien HENRIET <bubuabu@bubuabu.org>
Date: Wed, 30 Jan 2019 23:44:51 +0100
Subject: [PATCH 66/72] Fix os.date() for timezone change awareness
On POSIX target, system timezone change are not taken into account.
To reproduce,
1. call os.date()
2. change your timezone
3. call os.date() within the same luajit instance
On POSIX target, os.date use localtime_r to retrieve time.
On other target, the function localtime is used. But there is a behaviour
diference between these two function. localtime acts as if it called tzset
which localtime_r don't.
To fix the issue tzset is called before localtime_r.
---
src/lib_os.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lib_os.c b/src/lib_os.c
index ffbc3fd..09dc737 100644
--- a/src/lib_os.c
+++ b/src/lib_os.c
@@ -185,6 +185,7 @@ LJLIB_CF(os_date)
#endif
} else {
#if LJ_TARGET_POSIX
+ tzset();
stm = localtime_r(&t, &rtm);
#else
stm = localtime(&t);
--
2.20.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。