Explorar o código

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>
Daniel Bertalan %!s(int64=3) %!d(string=hai) anos
pai
achega
32480fbeb9
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Userland/Libraries/LibCore/DateTime.cpp

+ 4 - 0
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;
             }