1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:38:12 +00:00

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>
This commit is contained in:
Daniel Bertalan 2022-07-10 15:35:09 +02:00 committed by Andreas Kling
parent 42e22f89a4
commit 32480fbeb9

View file

@ -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;
}