Browse Source

consider _ year as 2000

master
katherine 7 months ago
parent
commit
b4d0efeebd
Signed by: ageha <ageha@airen-no-jikken.icu> GPG Key ID: 62E17859D559AEF3
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/calendar.c

+ 4
- 2
src/calendar.c View File

@@ -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;
}



Loading…
Cancel
Save