Update of /cvsroot/linux-mips/linux/arch/mips/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv30291
Modified Files:
time.c
Log Message:
Months in struct tm are counted from 0-11, in the DS1386 from 1-12.
Index: time.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/time.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- time.c 2001/10/15 22:57:28 1.10
+++ time.c 2001/11/12 18:15:24 1.11
@@ -496,7 +496,7 @@
for (i = 1; day >= days_in_month(i); i++)
day -= days_in_month(i);
days_in_month(FEBRUARY) = 28;
- tm->tm_mon = i;
+ tm->tm_mon = i-1; /* tm_mon starts from 0 to 11 */
/* Days are what is left over (+1) from all that. */
tm->tm_mday = day + 1;
|