From: short <> Date: Mon, 1 Jan 2001 23:05:25 +0000 (+0000) Subject: Fixed check failing on January - it is 0..11, not 1..12 as I previously thought. X-Git-Tag: rel1_0_1~1 X-Git-Url: https://git.jankratochvil.net/?p=timeplan.git;a=commitdiff_plain;h=e25fc98af07cf3c457ac22303a43615e030918be Fixed check failing on January - it is 0..11, not 1..12 as I previously thought. --- diff --git a/timeplan.c b/timeplan.c index f710be7..62ee68f 100644 --- a/timeplan.c +++ b/timeplan.c @@ -693,7 +693,7 @@ const char *days[]={"Ne","Po","Ut","St","Ct","Pa","So"}; t=mktime(&tm); if (t==-1 || tm.tm_wday<0 || tm.tm_wday>6 || tm.tm_mday<1 || tm.tm_mday>31 - || tm.tm_mon <1 || tm.tm_mon >12 + || tm.tm_mon <0 || tm.tm_mon >11 || tm.tm_year<80 || tm.tm_year>150 ) { fprintf(ERRH1"Incorrect timestamp \"%s\""WHERE1,ERRH2,buf,WHERE2);