aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-12-21 01:15:20 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-12-21 01:15:20 -0700
commitb4d0efeebd5e81ff7a72a9cb34c4664d1caf4ddd (patch)
tree7dfe27aac1bc1d7ecbbf638da2e64af90ffbd7b0
parenta5bb83fc44899c52252c44cf71a921a820592b54 (diff)
downloadevery-b4d0efeebd5e81ff7a72a9cb34c4664d1caf4ddd.tar.gz
consider _ year as 2000
-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;
}