]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Set fallback first_weekday to 0 (fix #1012)
authorJean-Michel Vourgère <nirgal@debian.org>
Sun, 16 Jun 2019 06:07:32 +0000 (08:07 +0200)
committerTobias Oetiker <tobi@oetiker.ch>
Sun, 16 Jun 2019 18:02:11 +0000 (20:02 +0200)
- 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

src/rrd_graph.c
src/rrd_rpncalc.c

index f5d2cdec5713d4213282e8e2333adc7173eb02d8..62c3e645f0cce0bee8fc2c0d642587e07afae3b9 100644 (file)
@@ -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;
index 0f54c6be6ba2fe073c47a7ebcf5a94a37dc35044..84f6921195b7ea4de987a345ba766489260d686d 100644 (file)
@@ -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;