SCP: Fix year offset used when expanding DATE_19XX_YY and DATE_19XX_YYYY
This commit is contained in:
parent
5e6127ec5b
commit
5ffd11c636
1 changed files with 1 additions and 1 deletions
2
scp.c
2
scp.c
|
@ -3063,7 +3063,7 @@ for (; *ip && (op < oend); ) {
|
|||
}
|
||||
else if ((!strcmp ("DATE_19XX_YY", gbuf)) || /* Year with same calendar */
|
||||
(!strcmp ("DATE_19XX_YYYY", gbuf))) {
|
||||
int year = tmnow->tm_year + 1900 + 22;
|
||||
int year = tmnow->tm_year + 1900;
|
||||
int days = year - 2001;
|
||||
int leaps = days/4 - days/100 + days/400;
|
||||
int lyear = ((year % 4) == 0) && (((year % 100) != 0) || ((year % 400) == 0));
|
||||
|
|
Loading…
Add table
Reference in a new issue