projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55ddbc3
)
fix tm_to_time logic for number of days in november
author
Rich Felker
<dalias@aerifal.cx>
Sat, 26 Jan 2013 16:40:40 +0000
(11:40 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 26 Jan 2013 16:40:40 +0000
(11:40 -0500)
report/patch by Hiltjo Posthuma <hiltjo@codemadness.org>
src/time/__tm_to_time.c
patch
|
blob
|
history
diff --git
a/src/time/__tm_to_time.c
b/src/time/__tm_to_time.c
index 3fa15fadf3e73139fb8b32a0d526781415683ac9..3b1140b6cacef808af9b7785eddde5905013e17d 100644
(file)
--- a/
src/time/__tm_to_time.c
+++ b/
src/time/__tm_to_time.c
@@
-26,7
+26,7
@@
time_t __tm_to_time(struct tm *tm)
z100 = Q(z4, 25);
z400 = Q(z100, 4);
day += year*365 + z4 - z100 + z400 +
- month[(int []){0,31,59,90,120,151,181,212,243,273,304,33
5
}];
+ month[(int []){0,31,59,90,120,151,181,212,243,273,304,33
4
}];
return (long long)day*86400
+ tm->tm_hour*3600 + tm->tm_min*60 + tm->tm_sec
- -946684800; /* the dawn of time :) */