mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibCore: Make DateTime::create() not fill in tm_wday and tm_yday for calling mktime()
This commit is contained in:
parent
459e4ace93
commit
221b412210
1 changed files with 1 additions and 2 deletions
|
@ -53,8 +53,7 @@ DateTime DateTime::create(unsigned year, unsigned month, unsigned day, unsigned
|
|||
tm.tm_mday = (int)day;
|
||||
tm.tm_mon = (int)month - 1;
|
||||
tm.tm_year = (int)year - 1900;
|
||||
tm.tm_wday = (int)dt.weekday();
|
||||
tm.tm_yday = (int)dt.day_of_year();
|
||||
// mktime() doesn't read tm.tm_wday and tm.tm_yday, no need to fill them in.
|
||||
dt.m_timestamp = mktime(&tm);
|
||||
|
||||
return dt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue