Hi, Thanks for your mail. I have
done it. please refer this function get_rtc_time in include/asm-generic/rtc.h regards, K.Lekshmanan. On Tue, Jan 22, 2008 at 06:17:29PM +0530, > I want to print current date and time in a
kernel module. > > 1) do we have direct functions that we could use in
kernel? No. > 2) Can get time from epoch using gettimeofday?
So, how do I convert > it to the current date and time string. Is there something similar
to > > userspace ctime in kernel? You don't. The kernel doesn't have an idea about current date and time. Date and time depends on timezone rules, and that's userspace. If you need date and time of your local timezone in your kernel module, your module is broken by design. Erik -- They're all fools. Don't worry. eventually get them. -- Matthew Lammers in alt.sysadmin.recovery |