提交 d5c164d5 编写于 作者: R Rich Felker

fix tm_to_time logic for number of days in november

report/patch by Hiltjo Posthuma <hiltjo@codemadness.org>
上级 55ddbc3e
...@@ -26,7 +26,7 @@ time_t __tm_to_time(struct tm *tm) ...@@ -26,7 +26,7 @@ time_t __tm_to_time(struct tm *tm)
z100 = Q(z4, 25); z100 = Q(z4, 25);
z400 = Q(z100, 4); z400 = Q(z100, 4);
day += year*365 + z4 - z100 + z400 + day += year*365 + z4 - z100 + z400 +
month[(int []){0,31,59,90,120,151,181,212,243,273,304,335}]; month[(int []){0,31,59,90,120,151,181,212,243,273,304,334}];
return (long long)day*86400 return (long long)day*86400
+ tm->tm_hour*3600 + tm->tm_min*60 + tm->tm_sec + tm->tm_hour*3600 + tm->tm_min*60 + tm->tm_sec
- -946684800; /* the dawn of time :) */ - -946684800; /* the dawn of time :) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册