Here is my attempt of the challenge it seems to work but any advice is much appreciated.
void whatDateWillItBe (int seconds)
struct tm now;
long secondsSince1970 = time(NULL); long secondsSince1970AndSome = secondsSince1970 + seconds; localtime_r(&secondsSince1970AndSome, &now); printf("The date in %i seconds from now will be %d/%d/%d",seconds,now.tm_mday,now.tm_mon + 1,now.tm_year+1900);
int main (int argc, const char * argv)
int mySeconds = 4000000; whatDateWillItBe(mySeconds); return 0;
Cheers, great book so far by the way!