I’m writing a simple web server in C on Linux.
I have to add the last modified time of a file that will be transferred to the client(browser),
I analysed how some websites and find out that they all present the time in format:
Fri, 12 Nov 2010 16:02:54 GMT,
my question is, can I transfer a time_t value to something string in the former format simply? Is there a function to do this? Or is the format unimportant at all?
strftime() is the function you need.
The wikipedia article on time_t gives a good example
http://en.wikipedia.org/wiki/Time_t