puoi usare time per la data di sistema

codice:
#include<time.h>

time_t t = time(NULL);
struct tm tm =*localtime(&t);