From: Jean-Michel Vourgère Date: Sun, 16 Jun 2019 06:07:32 +0000 (+0200) Subject: Set fallback first_weekday to 0 (fix #1012) X-Git-Tag: v1.8.0~92 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=02c2365eb2b560f66e569f4062daa64118d2bf99;p=thirdparty%2Frrdtool-1.x.git Set fallback first_weekday to 0 (fix #1012) - Set first_weekday to 0 (Sunday), when HAVE__NL_TIME_WEEK_1STDAY is not defined - Fixes: https://github.com/oetiker/rrdtool-1.x/issues/1012 --- diff --git a/src/rrd_graph.c b/src/rrd_graph.c index f5d2cdec..62c3e645 100644 --- a/src/rrd_graph.c +++ b/src/rrd_graph.c @@ -1568,7 +1568,7 @@ static int find_first_weekday( } first_weekday = (week_1stday + first_weekday - 1) % 7; #else - first_weekday = 1; + first_weekday = 0; #endif } return first_weekday; diff --git a/src/rrd_rpncalc.c b/src/rrd_rpncalc.c index 0f54c6be..84f69211 100644 --- a/src/rrd_rpncalc.c +++ b/src/rrd_rpncalc.c @@ -564,7 +564,7 @@ static int find_first_weekday(void){ } first_weekday=(week_1stday + first_weekday - 1) % 7; #else - first_weekday = 1; + first_weekday = 0; #endif } return first_weekday;