Linux MIPS Architecture development
 help / color / mirror / Atom feed
* to_tm() in kernel/time.c?
@ 2003-12-09 20:58 Brad Parker
  2003-12-09 22:19 ` Jun Sun
  0 siblings, 1 reply; 2+ messages in thread
From: Brad Parker @ 2003-12-09 20:58 UTC (permalink / raw)
  To: linux-mips


Can anyone tell me if to_tm() in kernel/time.c returns months as 0-11?
(in the current mips tree, that is)

I'm curious if the to_tm() in the ppc tree is the same as the to_tm()
in the mips tree.  In the ppc tree it returns 1-12.

-brad

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: to_tm() in kernel/time.c?
  2003-12-09 20:58 to_tm() in kernel/time.c? Brad Parker
@ 2003-12-09 22:19 ` Jun Sun
  0 siblings, 0 replies; 2+ messages in thread
From: Jun Sun @ 2003-12-09 22:19 UTC (permalink / raw)
  To: Brad Parker; +Cc: linux-mips, jsun

On Tue, Dec 09, 2003 at 03:58:06PM -0500, Brad Parker wrote:
> 
> Can anyone tell me if to_tm() in kernel/time.c returns months as 0-11?
> (in the current mips tree, that is)
> 

It is 0-11.  See the code

        tm->tm_mon = i - 1;             /* tm_mon starts from 0 to 11 */

> I'm curious if the to_tm() in the ppc tree is the same as the to_tm()
> in the mips tree.  In the ppc tree it returns 1-12.
>

The routine was copied from PPC.  I think tm_mon is set to 0-11 so as to match
struct rtc_time usage when it is exported to userland.

I will check with PPC folks to see why they changed it.

Jun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-09 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-09 20:58 to_tm() in kernel/time.c? Brad Parker
2003-12-09 22:19 ` Jun Sun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox