我正在尝试获取到今天为止的天数。喜欢:
int days, seconds;
seconds = Time(0); // Get the number of SECONDS from January, 1º 1970 untill now.
days = seconds / (60 * 60 * 24);
printf("%d", days);
输出为:16326。
但是当我使用一些为您进行转换的网站时,它们显示的是 6464 天。
我做错了什么?
最佳答案
你是对的。 30 + 14 = 44 年,大约有 16000 天。
关于c - 使用 Time 获取当前日期的天数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25828676/