LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1140|回复: 2

FreeBSD下能设定的最大年份是多少?

[复制链接]
发表于 2003-11-5 08:57:12 | 显示全部楼层 |阅读模式
我在4.9下能设定的最大年份为2037年,如果设2038年,就显示为“date: nonexistent time”,看来FreeBSD的时间设计也没有设的很大。
发表于 2003-11-5 10:33:25 | 显示全部楼层
很多系统都有这个时间限制! 一般都在100年内!
 楼主| 发表于 2003-11-5 10:36:22 | 显示全部楼层
As with all Unix and Unix-like operating systems, time and dates in FreeBSD are represented internally as the number of seconds since the 1st of January 1970 (the Unix "epoch"). Currently, that figure is stored as a 32 bit integer, and will run out part way through 2038. By then we should (hopefully) be using a counter of 64 bits (or greater) which should be good until the end of the universe.

Note that the OS being Y2K compliant will not fix errant applications that are not Y2K compliant.

Note also that the OS expects to read the current date and time from the CMOS clock of your computer. Not all of these devices correctly handle the year 2000. You are advised to test each platform individually to ensure that your hardware clock behaves correctly when going from 1999 to 2000, and that it correctly interprets the year 2000 as a leap year.

从这段话上看,FreeBSD在2038年后会解决这个问题,用64位表示年份,两个现在则不会考虑。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表