dect
/
linux-2.6
Archived
13
0
Fork 0

[CIFS] Do not need to adjust for Jan/Feb for leap day

calculation in 2100 (year divisible by 100)

Signed-off-by: Yehuda Sadeh Weinraub <Yehuda.Sadeh@expand.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French 2006-10-11 18:49:24 +00:00
parent 438dd92626
commit 70903ca004
1 changed files with 2 additions and 1 deletions

View File

@ -956,7 +956,8 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
days = days - 1; /* do not count leap year for the year 2100 */
/* adjust for leap year where we are still before leap day */
days -= ((year & 0x03) == 0) && (month < 2 ? 1 : 0);
if(year != 120)
days -= ((year & 0x03) == 0) && (month < 2 ? 1 : 0);
sec += 24 * 60 * 60 * days;
ts.tv_sec = sec;