From: Teemu Toivola Date: Sat, 10 Mar 2018 23:44:14 +0000 (+0200) Subject: use ISO date formats by default X-Git-Tag: v2.0~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6aaf0bbc1eb16d15691993bce6c8593bde961e0;p=vnstat use ISO date formats by default --- diff --git a/cfg/vnstat.conf b/cfg/vnstat.conf index 343ce71..706bd31 100644 --- a/cfg/vnstat.conf +++ b/cfg/vnstat.conf @@ -15,9 +15,9 @@ MonthRotate 1 # date output formats for -d, -m, -t and -w # see 'man date' for control codes -DayFormat "%x" -MonthFormat "%b '%y" -TopFormat "%x" +DayFormat "%Y-%m-%d" +MonthFormat "%Y-%m" +TopFormat "%Y-%m-%d" # characters used for visuals RXCharacter "%" @@ -152,7 +152,7 @@ PidFile "/var/run/vnstat/vnstat.pid" ## # title timestamp format -HeaderFormat "%x %H:%M" +HeaderFormat "%Y-%m-%d %H:%M" # show hours with rate (1 = enabled, 0 = disabled) HourlyRate 1 diff --git a/src/common.h b/src/common.h index 4f5f1fc..3ecd019 100644 --- a/src/common.h +++ b/src/common.h @@ -74,11 +74,11 @@ and most can be changed later from the config file. #define MONTHROTATE 1 /* date output formats for -d, -m, -t and image header*/ -/* see 'man date' for control codes <1.8 values */ -#define DFORMAT "%x" /* "%d.%m." */ -#define MFORMAT "%b '%y" /* "%b '%y" */ -#define TFORMAT "%x" /* "%d.%m.%y" */ -#define HFORMAT "%x %H:%M" /* "%d.%m.%Y %H:%M" */ +/* see 'man date' for control codes 1.x values <1.8 values */ +#define DFORMAT "%Y-%m-%d" /* "%x" "%d.%m." */ +#define MFORMAT "%Y-%m" /* "%b '%y" "%b '%y" */ +#define TFORMAT "%Y-%m-%d" /* "%x" "%d.%m.%y" */ +#define HFORMAT "%Y-%m-%d %H:%M" /* "%x %H:%M" "%d.%m.%Y %H:%M" */ /* characters used for visuals */ #define RXCHAR "%"