I need to print this value as a time string to Mon 16-Aug-2010 06:24 format or something similar.
unsigned int t = 1281920090;
I need to print this value as a time string to Mon 16-Aug-2010 06:24 format or something similar.
unsigned int t = 1281920090;
That's actually a time_t
not an unsigned int.
You can use ctime
to generate a simple string in a similar format (or a combination of asctime
and localtime
or gmtime
) or you can use strftime
to specify the exact format you want.