From 22b56d6a82047df5ce21e903da7e6fcb9b6b7605 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 18 Jan 2021 18:11:44 +0100 Subject: [PATCH] LibC: Make tzset() set daylight to 0 Quoting POSIX: https://pubs.opengroup.org/onlinepubs/009695399/functions/tzset.html The tzset() function also shall set the external variable daylight to 0 if Daylight Savings Time conversions should never be applied for the timezone in use; otherwise, non-zero. We're already pretending to be in UTC+0 and setting timezone to 0 accordingly, we can also fake the absence of Daylight Savings Time. --- Userland/Libraries/LibC/time.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibC/time.cpp b/Userland/Libraries/LibC/time.cpp index 72b80e1d55..349f198374 100644 --- a/Userland/Libraries/LibC/time.cpp +++ b/Userland/Libraries/LibC/time.cpp @@ -333,6 +333,7 @@ void tzset() { // FIXME: Here we pretend we are in UTC+0. timezone = 0; + daylight = 0; tzname[0] = const_cast(__utc); tzname[1] = const_cast(__utc); }