提交 2a780aa3 编写于 作者: R Rich Felker

treat empty TZ environment variable as GMT rather than default

this improves compatibility with the behavior of other systems and
with some applications which set an empty TZ var to disable use of
local time by mktime, etc.
上级 8f08a58c
......@@ -125,7 +125,8 @@ static void do_tzset()
"/usr/share/zoneinfo/\0/share/zoneinfo/\0/etc/zoneinfo/\0";
s = getenv("TZ");
if (!s || !*s) s = "/etc/localtime";
if (!s) s = "/etc/localtime";
if (!*s) s = __gmt;
if (old_tz && !strcmp(s, old_tz)) return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册