I'm not much of a C programmer, but do some programming in other languages. I have a task of updating some code in a C program and having some trouble with using time and date information. The program is running on Windows NT 4 and I believe it's not returning any date at all because I end up with "Wed Dec 31 19:00:00 1969". Code snipet below. Can anyone help or make suggestions? Using Visual C++.
Thanks.
James (by the way, I end up doing more than just printing the time/date to the screen, that's just for debugging purposes)
struct tm *local;
time_t t;
local = localtime(&t);
printf(ctime(&t));
This yields:
Wed Dec 31 19:00:00 1969
Thanks.
James (by the way, I end up doing more than just printing the time/date to the screen, that's just for debugging purposes)
struct tm *local;
time_t t;
local = localtime(&t);
printf(ctime(&t));
This yields:
Wed Dec 31 19:00:00 1969