From 38aa051f12d89d78d37dd83b659ac08ef1f4fe52 Mon Sep 17 00:00:00 2001 From: stasoid Date: Wed, 30 Oct 2024 14:35:46 +0500 Subject: [PATCH] LibCore: Port DateTime to Windows --- Userland/Libraries/LibCore/DateTime.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Userland/Libraries/LibCore/DateTime.cpp b/Userland/Libraries/LibCore/DateTime.cpp index 9dcea3b9d19..f4034359b64 100644 --- a/Userland/Libraries/LibCore/DateTime.cpp +++ b/Userland/Libraries/LibCore/DateTime.cpp @@ -15,6 +15,13 @@ #include #include +#ifdef AK_OS_WINDOWS +# define tzname _tzname +# define timegm _mkgmtime +# define localtime_r(time, tm) localtime_s(tm, time) +# define gmtime_r(time, tm) gmtime_s(tm, time) +#endif + namespace Core { static Optional parse_time_zone_name(GenericLexer& lexer)