[kernel Programming] Convert timespec to Datetime
Hi people,
i have a little question!! i'm changing some syscalls functions into kernel 2.6.36.2 So i'm doing this : Code:
struct inode * inode; But i have a output like this : Date 1293619251 How can i convert inode->i_atime into D:M:Y h:m Format?? or just simply D:M:Y Thanks |
That's what is called a timestamp - it's the number of seconds since the midnight on the 1st January 1970.
You can use the ctime function in time.h to convert it to a char* array, which can be manipulated into the format you want :) |
All times are GMT -5. The time now is 02:38 AM. |