From 32480fbeb96d3436805f092d80e3417f54273a00 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Sun, 10 Jul 2022 15:35:09 +0200 Subject: [PATCH] LibCore: Do not refer to `extern int daylight` in DateTime::to_string This variable does not exist on FreeBSD. Co-Authored-By: Al Hoang <13622+hoanga@users.noreply.github.com> --- Userland/Libraries/LibCore/DateTime.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Libraries/LibCore/DateTime.cpp b/Userland/Libraries/LibCore/DateTime.cpp index 4a5dc66c04..bf09253f77 100644 --- a/Userland/Libraries/LibCore/DateTime.cpp +++ b/Userland/Libraries/LibCore/DateTime.cpp @@ -251,7 +251,11 @@ String DateTime::to_string(StringView format) const format_time_zone_offset(true); break; case 'Z': { +#ifndef __FreeBSD__ auto const* timezone_name = tzname[daylight]; +#else + auto const* timezone_name = tzname[0]; +#endif builder.append({ timezone_name, strlen(timezone_name) }); break; }