原本以 12:00 作為起始及結束,系統更新為 PHP 5.4 後 mktime 函式回傳值,若以 shell 指令比較多了 8 小時,以致於資料庫中的課表都因時間不在週期上而無法正常顯示。
echo mktime(12,0,0,9,18,2014,-1); [root@dyw219 ~]# date -d @1411041600 Thu Sep 18 20:00:00 CST 2014
[root@moodle moodle23]# grep timezone /etc/php.ini ; Defines the default timezone used by the date functions ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone date.timezone = Asia/Taipei