mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
LibC: Use altzone for the current time zone offset during DST
This commit is contained in:
parent
2000251333
commit
7fceb909a5
1 changed files with 2 additions and 2 deletions
|
@ -146,7 +146,7 @@ static time_t tm_to_time(struct tm* tm, long timezone_adjust_seconds)
|
|||
time_t mktime(struct tm* tm)
|
||||
{
|
||||
tzset();
|
||||
return tm_to_time(tm, timezone);
|
||||
return tm_to_time(tm, daylight ? altzone : timezone);
|
||||
}
|
||||
|
||||
struct tm* localtime(const time_t* t)
|
||||
|
@ -162,7 +162,7 @@ struct tm* localtime_r(const time_t* t, struct tm* tm)
|
|||
if (!t)
|
||||
return nullptr;
|
||||
|
||||
time_to_tm(tm, *t - timezone);
|
||||
time_to_tm(tm, *t - (daylight ? altzone : timezone));
|
||||
return tm;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue