mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibC: Make timegm() force tm_isdst to 0
UTC is not affected by summer time, and the BSD manpage for timegm() says "The tm_isdst [...] members are forced to zero by timegm()."
This commit is contained in:
parent
7aa9413b53
commit
bb1f6f71f1
Notes:
sideshowbarker
2024-07-17 03:19:14 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/bb1f6f71f1 Pull-request: https://github.com/SerenityOS/serenity/pull/16686 Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 1 additions and 0 deletions
|
@ -214,6 +214,7 @@ struct tm* localtime_r(time_t const* t, struct tm* tm)
|
|||
|
||||
time_t timegm(struct tm* tm)
|
||||
{
|
||||
tm->tm_isdst = 0;
|
||||
return tm_to_time(tm, { __utc, __builtin_strlen(__utc) });
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue