You could use standard functions instead of windows functions:


#include <stdio.h>
#include <time.h>

int main() {
struct tm *timeinfo;
char buffer[80];
time_t tim = time(NULL);