ctime functions in C returns same string for differing values of atime, mtime, and ctime?
问题 When using the stat() function in minGW-W64, and the struct it returns, here info , why does ctime return the same exact strings for info.st_atime , mtime , and ctime , even though the their integer values are different? If localtime is used to get each time component separately, the results differ and appear accurate; that is, they match the dates in the file folders I've observed. ctime(&info.st_atime ) versus localtime(&info.st_atime )->tm_wday, localtime(&info.st_atime )->tm_mon,