diff --git a/userspace/libraries/LibC/include/time.h b/userspace/libraries/LibC/include/time.h index 2f41aa2d..ab405276 100644 --- a/userspace/libraries/LibC/include/time.h +++ b/userspace/libraries/LibC/include/time.h @@ -1,7 +1,7 @@ #ifndef _TIME_H #define _TIME_H 1 -// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html +// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/time.h.html #include @@ -24,15 +24,17 @@ struct sigevent; struct tm { - int tm_sec; /* Seconds [0,60]. */ - int tm_min; /* Minutes [0,59]. */ - int tm_hour; /* Hour [0,23]. */ - int tm_mday; /* Day of month [1,31]. */ - int tm_mon; /* Month of year [0,11]. */ - int tm_year; /* Years since 1900. */ - int tm_wday; /* Day of week [0,6] (Sunday =0). */ - int tm_yday; /* Day of year [0,365]. */ - int tm_isdst; /* Daylight Savings flag. */ + int tm_sec; /* Seconds [0,60]. */ + int tm_min; /* Minutes [0,59]. */ + int tm_hour; /* Hour [0,23]. */ + int tm_mday; /* Day of month [1,31]. */ + int tm_mon; /* Month of year [0,11]. */ + int tm_year; /* Years since 1900. */ + int tm_wday; /* Day of week [0,6] (Sunday =0). */ + int tm_yday; /* Day of year [0,365]. */ + int tm_isdst; /* Daylight Saving flag. */ + long tm_gmtoff; /* Seconds east of UTC. */ + const char* tm_zone; /* Timezone abbreviation */ }; struct timespec diff --git a/userspace/libraries/LibC/time.cpp b/userspace/libraries/LibC/time.cpp index 86334d52..9f7bb4f7 100644 --- a/userspace/libraries/LibC/time.cpp +++ b/userspace/libraries/LibC/time.cpp @@ -190,6 +190,9 @@ struct tm* gmtime_r(const time_t* timer, struct tm* __restrict result) result->tm_year -= 1900; result->tm_isdst = 0; + result->tm_gmtoff = 0; + result->tm_zone = "UTC"; + return result; }