I know that my code delivers the solution to the challenge but I also know its not slimmed down so I was hoping I could get some critique from others. Thanks!
[code]#include <stdio.h>
#include <time.h>
int main(int argc, const char * argv[]) {
long secondsSince1970 = time(NULL);
printf(“It has been %ld seconds since 1970\n”, secondsSince1970);
struct tm now;
localtime_r(&secondsSince1970, &now);
printf("The time is %d:%d:%d\n", now.tm_hour, now.tm_min, now.tm_sec);
long extra40Seconds = secondsSince1970 + 4000000;
printf("Adding 4,000,000 seconds to right now is %ld\n", extra40Seconds);
struct tm later;
localtime_r(&extra40Seconds, &later);
printf("Future date will be %d:%d:%d\n", later.tm_mon + 1, later.tm_mday, later.tm_year + 1900);
return 0;
}[/code]