time_t timer;
struct tm *t;
/* gets time of day */
timer = time(NULL);
/* converts date/time to a structure */
t = localtime(&timer);
sprintf(today"%04d-%02d-%02d", t->tm_year+1900, t->tm_mon+1, t->tm_mday);

+ Recent posts