diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 8e0d4cc030..40d1bf1e09 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -889,7 +889,11 @@ static int parse_timestamp_impl( if (!k || *k != ' ') continue; +#ifdef __GLIBC__ + /* musl does not set tm_wday field and set 0 unless it is explicitly requested by %w or so. + * In the below, let's only check tm_wday field only when built with glibc. */ weekday = day->nr; +#endif t = k + 1; break; }