aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/calendar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/calendar.c b/src/calendar.c
index f5bdc27..fac3137 100644
--- a/src/calendar.c
+++ b/src/calendar.c
@@ -231,7 +231,7 @@ static time_t sub_get_date(struct state_s *s)
time_t rt = 0;
struct tm tmp;
struct tm t = {
- .tm_year = 1,
+ .tm_year = 2000,
.tm_mday = 1,
.tm_isdst = -1,
};
@@ -246,6 +246,8 @@ static time_t sub_get_date(struct state_s *s)
switch (i) {
/* year */
case 0:
+ l = 2000;
+ break;
case 1:
case 2:
l = 1;
@@ -365,7 +367,7 @@ validate:
tmp.tm_min != t.tm_min ||
tmp.tm_sec != t.tm_sec
) {
- ERRP("invalid date!");
+ ERRP("invalid date");
s->err_flag = true;
}