前陣子從 PHPBB Plus 1.3 轉到 2.0.15 ,一切都穩定了下來,加了幾個外掛也都正常無誤,但加了生日外掛後,生日的顯示一直有問題。
整個安裝程序走了三遍,並沒有看到什麼錯誤,但日期就是不對。到資料庫裡看 19701128 會被顯示為 2013.06.05。19800727 會被顯示為 2013.11.30。我修改生日到 1969.03.18 後到資料庫裡去看,看到的是 -289 。
這是正常的嗎?我該自己將會員的生日都重輸入一遍以配合 mkrealdate 所使用的系統 ,還是哪裡裝錯,修正就好了?
[問題] 生日外掛 1.5.7 安裝後,舊資料的生日取出來全亂了(
版主: 版主管理群
[問題] 生日外掛 1.5.7 安裝後,舊資料的生日取出來全亂了(
最後由 momoC 於 2005-06-28 02:32 編輯,總共編輯了 1 次。
● 架設主機作業系統:IIS 6.0
● 上網方式:DSL
● 虛擬空間 http://www.securemate.com
● 安裝程式:php 4 + MySql 2.5.4
● phpBB2 版本:phpBB 2.0.22
● domain: http://www.genderwars.org
● phpBB 連結: http://phpbb.genderwars.org
● 上網方式:DSL
● 虛擬空間 http://www.securemate.com
● 安裝程式:php 4 + MySql 2.5.4
● phpBB2 版本:phpBB 2.0.22
● domain: http://www.genderwars.org
● phpBB 連結: http://phpbb.genderwars.org
對了,這是作者的說明。如果以後也有人有一樣的問題的話。因為我看得有些似懂非懂(PHP 才剛學)就恕我不翻譯了:
The format of the general dates storred into the DB by phpBB2 are UNIX time stamps - how-ever since servers runing on windows maschines does NOT support dates older than 1986, it can not be used for birthdays.
To slove this I have inlcuded 2 functions witch can handle dates back in time (also if runing on windows) these functions does not work with UNIX TIMES STAMPS but almost - it is a UNIX TIME STAMP divided by 86400 (number of secounds in a day) so the number storred in the DB are actual the number of days since 1. jan 1970 (with sign) a date back in 1960 should this way have a negative number.
我正在找日期轉換的公式,看看有沒有可能在讀取資料庫前,自己做小轉換。或是資料庫日期的轉換程式,所以不用自己手動修改。如果有人知道的話,麻煩告知,謝謝囉~
The format of the general dates storred into the DB by phpBB2 are UNIX time stamps - how-ever since servers runing on windows maschines does NOT support dates older than 1986, it can not be used for birthdays.
To slove this I have inlcuded 2 functions witch can handle dates back in time (also if runing on windows) these functions does not work with UNIX TIMES STAMPS but almost - it is a UNIX TIME STAMP divided by 86400 (number of secounds in a day) so the number storred in the DB are actual the number of days since 1. jan 1970 (with sign) a date back in 1960 should this way have a negative number.
我正在找日期轉換的公式,看看有沒有可能在讀取資料庫前,自己做小轉換。或是資料庫日期的轉換程式,所以不用自己手動修改。如果有人知道的話,麻煩告知,謝謝囉~
