1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
void convert_filetime(char *date_out,int file_handle)
{
int sec,min,hour,day,month,year;
struct ftime file_time;
getftime(file_handle,&file_time);
sec=file_time.ft_tsec*2; min=file_time.ft_min; hour=file_time.ft_hour;
day=file_time.ft_day; month=file_time.ft_month; year=file_time.ft_year+1980;
sprintf(date_out,"%02d/%02d/%4d à %02d:%02d:%02d",day,month,year,hour,min,sec);
}
ou encore
void convert_filetime(char *date_out,int file_handle)
{
struct ftime file_time;
getftime(file_handle,&file_time);
sprintf(date_out,"%02d/%02d/%4d à %02d:%02d:%02d",(int)file_time.ft_day,(int)file_time.ft_month,(int)file_time.ft_year+1980,
(int)file_time.ft_hour,(int)file_time.ft_min,(int)file_time.ft_tsec*2);
} |
Partager