1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 14:47:46 +00:00

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.
This commit is contained in:
Linus Groh 2021-01-18 18:11:44 +01:00 committed by Andreas Kling
parent 0d58e75910
commit 22b56d6a82

View file

@ -333,6 +333,7 @@ void tzset()
{ {
// FIXME: Here we pretend we are in UTC+0. // FIXME: Here we pretend we are in UTC+0.
timezone = 0; timezone = 0;
daylight = 0;
tzname[0] = const_cast<char*>(__utc); tzname[0] = const_cast<char*>(__utc);
tzname[1] = const_cast<char*>(__utc); tzname[1] = const_cast<char*>(__utc);
} }