基礎求教
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\AppServ\www\time.php on line 10
北京時間:2012-04-11 15;32;57
表示已經將windows php.int 改到Asia/hong_kong了 怎麼還是差8個時差
------解決方案--------------------
PHP code
date_default_timezone_set(PHP 5 >= 5.1.0)date_default_timezone_set — 設定用於一個指令碼中所有日期時間函數的預設時區說明bool date_default_timezone_set ( string $timezone_identifier )date_default_timezone_set() 設定用於所有日期時間函數的預設時區。 Note: 自 PHP 5.1.0 起(此版本日期時間函數被重寫了),如果時區不合法則每個對日期時間函數的調用都會產生一條 E_NOTICE 層級的錯誤資訊,如果使用系統設定或 TZ 環境變數則還會產生 E_STRICT 層級的資訊。 參數timezone_identifier時區標識符,例如 UTC 或 Europe/Lisbon。合法標識符列表見所支援的時區列表。 傳回值 如果 timezone_identifier 參數無效則返回 FALSE,否則返回 TRUE。