H
Hao Xu
Hi everyone!
I think that everyone knows ctime() in glibc:
The ctime(), gmtime() and localtime() functions all take an argument
of data type time_t which represents calendar time. When interpreted
as an absolute time value, it represents the number of seconds
elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
Now I need to use the function of ctime() in linux kernel, but it
seems that I cannot access ctime() in the linux kernel, right? So I have
to reimplement ctime() in the linux kernel. I found that the algorithm
of glibc ctime() is very complex, I don't understand it. Does anyone has
any good ideas about how to implement ctime()?
Thanks!
I think that everyone knows ctime() in glibc:
The ctime(), gmtime() and localtime() functions all take an argument
of data type time_t which represents calendar time. When interpreted
as an absolute time value, it represents the number of seconds
elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
Now I need to use the function of ctime() in linux kernel, but it
seems that I cannot access ctime() in the linux kernel, right? So I have
to reimplement ctime() in the linux kernel. I found that the algorithm
of glibc ctime() is very complex, I don't understand it. Does anyone has
any good ideas about how to implement ctime()?
Thanks!