Chinaunix

标题: 为什么都以1970年1月1日0时为参照计算开机经过的秒数? [打印本页]

作者: kenskens    时间: 2007-02-01 11:50
标题: 为什么都以1970年1月1日0时为参照计算开机经过的秒数?
// 该函数计算从1970年1月1日0时起到开机当日经过的秒数,作为开机时间。
long kernel_mktime(struct tm * tm)
{
......
}

PS. I hate whoever though up the year 1970 - couldn't they have gotten a leap-year instead? I also hate Gregorius, pope or no. I'm grumpy.

为什么选定1970年1月1日,而不是别的时间?这和罗马教皇有什么关系?
作者: 帅绝人寰    时间: 2007-02-01 12:25
这是Unix纪元, 是以Unix诞生的时间为参照确定的。
作者: kenskens    时间: 2007-02-01 13:15
不好意思啊,最近才开始接触和学习Linux,好多常识可能不懂




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2