Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70903ca0 authored by Steve French's avatar Steve French
Browse files

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


calculation in 2100 (year divisible by 100)

Signed-off-by: default avatarYehuda Sadeh Weinraub <Yehuda.Sadeh@expand.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
parent 438dd926
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -956,6 +956,7 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
		days = days - 1;  /* do not count leap year for the year 2100 */
		days = days - 1;  /* do not count leap year for the year 2100 */


	/* adjust for leap year where we are still before leap day */
	/* adjust for leap year where we are still before leap day */
	if(year != 120)
		days -= ((year & 0x03) == 0) && (month < 2 ? 1 : 0);
		days -= ((year & 0x03) == 0) && (month < 2 ? 1 : 0);
	sec += 24 * 60 * 60 * days; 
	sec += 24 * 60 * 60 * days;