Re: to_tm() in kernel/time.c?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux