提交 70903ca0 编写于 作者: S Steve French

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

calculation in 2100 (year divisible by 100)
Signed-off-by: NYehuda Sadeh Weinraub <Yehuda.Sadeh@expand.com>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 438dd926
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册