I want to convert from specific date to seconds in C. For example, If I give 12/25/2015, it will convert into seconds. This is the program I found to convert current date to seconds. But I want to convert from specific date to seconds.
time_t timer;
struct tm y2k;
double seconds;
y2k.tm_hour = 0; y2k.tm_min = 0; y2k.tm_sec = 0;
y2k.tm_year = 0; y2k.tm_mon = 0; y2k.tm_mday = 1;
time(&timer);
seconds = difftime(timer,mktime(&y2k));
printf ("%.f ", seconds);