發新話題 Report thanks

[資訊分享] 30年後互聯網末日??

不經不覺,距千年蟲已八年了,大家都應該記得啦......
現在還有30年,另一個電腦臭蟲又出現-----2038年!!

最近開始有很多人談論<2038年蟲>,今次受影響的電腦是以秒數作時計的軟件,尤其針對32bit UNIX系統,及以C撰寫的程式,這些程式以1970年1月1日零時起逐秒累積計(不包閏秒),資料放在time_t及一個32bit的整數儲存器中....

理論上這儲存的最高值為(232)二的三十二次方作為極限(數值2147483647),所以整數的範圍是從-231到231-1。距離1900年越久,time()函數所傳回的秒數也會越大,當超過231-1時,就會產生溢位(over flow),此時計數器就會發生問題。而231-1為2147483647,正是到2038年1月19日的秒數,下一秒將回溯而成為1901年12月13日下午8時45分52秒,系統將會因數據錯誤而崩潰....


目前可預見及最簡單的方法,就是轉用64bit系統和軟件,這樣便可把臭蟲問題推遲至30萬年後....

那時地球還在嗎??

[本帖最後由michaelwong1227於2008-4-301:31編輯]
如果您喜歡這篇文章,請按「讚」或分享給您的朋友,以示鼓勵。

TOP

我相信2038年到時都唔會理32bit定係64bit,因為資訊產品0既嘢每十年就翻一翻

TOP

Year 2038 problem
The year 2038 problem (also known as "Unix Millennium bug", "Y2K38," "Y2K+38," or "Y2.038K" by analogy to the Y2K problem) may cause some computer software to fail before or in the year 2038. The problem affects Unix-like operating systems, which represent system time as the number of seconds (ignoring leap seconds) since 00:00:00 January 1, 1970.[1] This representation also affects software written for most other operating systems because of the broad deployment of C. On most 32-bit systems, the time_t data type used to store this second count is a signed 32-bit integer. The latest time that can be represented in this format, following the POSIX standard, is 03:14:07 UTC on Tuesday, January 19, 2038. Times beyond this moment will "wrap around" and be represented internally as a negative number, and cause programs to fail, since they will see these times not as being in 2038 but rather in 1901. Erroneous calculations and decisions may therefore result.

http://en.wikipedia.org/wiki/Year_2038_problem
有目標價  ...
冇目標價 2

TOP

回復 michaelwong1227 1# 的帖子

IN that time we all die

TOP

thanks