hello,
what is wrong?
i want to get the creation time of a directory (tcbuffer shows a wrong value).
'buffer' is an array with actual path...
struct _stat buf; //buffer of file status informations
struct tm *crTime; //time struct
char tcbuffer[500], tabuffer[500]; //array's for actual (ta...) und creation (tc...) time
time_t date; //time value
*tabuffer = NULL;
*tcbuffer = NULL;
_chdir(buffer);
//get actual date
_strdate(tabuffer);
//print actual date
printf("ta: %s\n", &tabuffer);
//get informations (buf) from actual directory (buffer)
_stat(buffer, &buf);
//copy date from directory info to time value
date = buf.st_ctime;
time(&date);
crTime = gmtime(&date);
//formats time struct to string
strftime( tcbuffer,9,"%m/%d/%y\n", crTime );
//pint creation time
printf("tc: %s\n",&tcbuffer );
what is wrong?
i want to get the creation time of a directory (tcbuffer shows a wrong value).
'buffer' is an array with actual path...
struct _stat buf; //buffer of file status informations
struct tm *crTime; //time struct
char tcbuffer[500], tabuffer[500]; //array's for actual (ta...) und creation (tc...) time
time_t date; //time value
*tabuffer = NULL;
*tcbuffer = NULL;
_chdir(buffer);
//get actual date
_strdate(tabuffer);
//print actual date
printf("ta: %s\n", &tabuffer);
//get informations (buf) from actual directory (buffer)
_stat(buffer, &buf);
//copy date from directory info to time value
date = buf.st_ctime;
time(&date);
crTime = gmtime(&date);
//formats time struct to string
strftime( tcbuffer,9,"%m/%d/%y\n", crTime );
//pint creation time
printf("tc: %s\n",&tcbuffer );