The getATime function does NOT attempt to print 'buf'. True, it defines it...
struct stat buf;
	//time_t tmp = buf.st_atime;
	printf("Accessed: %s\n", format_time(buf.st_atime));
... then "passes" it to format_time. But the undefined value, which could be problematic, is not used. The function format_time assigns a value to this passed buffer, possibly incorrectly through localtime(&cal_time) because I don't think it was passed by address. Anyhow, the printf in getATime relies on the return value of format_time and not its argument.