| To: | linux-mips@fnet.fr, linux-mips@oss.sgi.com |
|---|---|
| Subject: | to_tm() function in arch/mips/kernel/time.c |
| From: | Atsushi Nemoto <nemoto@toshiba-tops.co.jp> |
| Date: | Mon, 27 Aug 2001 17:12:41 +0900 (JST) |
| Cc: | Ralf Baechle <ralf@uni-koblenz.de> |
| Organization: | TOSHIBA Personal Computer System Corporation |
| Sender: | owner-linux-mips@oss.sgi.com |
Now new function to_tm() becomes available in arch/mips/kernel/time.c,
the calculation for tm_wday looks incorrect.
/* Days are what is left over (+1) from all that. */
tm->tm_mday = day + 1;
/*
* Determine the day of week
*/
tm->tm_wday = (day + 3) % 7;
This code say that a first day of any month is Wednesday :-)
Isn't this what you expected?
gday = day = tim / SECDAY;
...
tm->tm_wday = (gday + 4) % 7; /* 1970/1/1 was Thursday */
---
Atsushi Nemoto
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: scall_o32.S in 2.4.6 (or later), Ralf Baechle |
|---|---|
| Next by Date: | RE: bus error by write transaction (RE: [patch] linux 2.4.5: Make __dbe_table available to modules), Hiroo Hayashi |
| Previous by Thread: | scall_o32.S in 2.4.6 (or later), Atsushi Nemoto |
| Next by Thread: | shared memory, Tom Appermont |
| Indexes: | [Date] [Thread] [Top] [All Lists] |