Assuming your seconds are seconds since 1/1/1970 you can use localtime()
to convert such seconds (epoche time) to a struct tm
which you can then feed to strftime()
.
Using localtime()
takes into account the time zone settings of the machine doing the conversion.
If you are interested in GMT you can alternativly use gmtime()
.