diff options
Diffstat (limited to 'Userland/Libraries/LibC/time.cpp')
-rw-r--r-- | Userland/Libraries/LibC/time.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/time.cpp b/Userland/Libraries/LibC/time.cpp index 738d8ea594..9add36bb76 100644 --- a/Userland/Libraries/LibC/time.cpp +++ b/Userland/Libraries/LibC/time.cpp @@ -70,9 +70,10 @@ char* ctime_r(const time_t* t, char* buf) return asctime_r(localtime_r(t, &tm_buf), buf); } +static const int __seconds_per_day = 60 * 60 * 24; + static void time_to_tm(struct tm* tm, time_t t) { - constexpr int __seconds_per_day = 60 * 60 * 24; int year = 1970; for (; t >= days_in_year(year) * __seconds_per_day; ++year) t -= days_in_year(year) * __seconds_per_day; |