about summary refs log tree commit diff
path: root/src/time/__tm_to_time.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-01-26 11:40:40 -0500
committerRich Felker <dalias@aerifal.cx>2013-01-26 11:40:40 -0500
commitd5c164d5ff74f41976f2f983b14ce606fa396221 (patch)
tree22ae722eef404a9757232ecc544671a3064a2fdc /src/time/__tm_to_time.c
parent55ddbc3e5d70f03bc52aece95fffb6abad47dbf4 (diff)
downloadmusl-d5c164d5ff74f41976f2f983b14ce606fa396221.tar.gz
musl-d5c164d5ff74f41976f2f983b14ce606fa396221.tar.xz
musl-d5c164d5ff74f41976f2f983b14ce606fa396221.zip
fix tm_to_time logic for number of days in november
report/patch by Hiltjo Posthuma <hiltjo@codemadness.org>
Diffstat (limited to 'src/time/__tm_to_time.c')
-rw-r--r--src/time/__tm_to_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/time/__tm_to_time.c b/src/time/__tm_to_time.c
index 3fa15fad..3b1140b6 100644
--- 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,335}];
+		month[(int []){0,31,59,90,120,151,181,212,243,273,304,334}];
 	return (long long)day*86400
 		+ tm->tm_hour*3600 + tm->tm_min*60 + tm->tm_sec
 		- -946684800; /* the dawn of time :) */