基礎求教,該怎麼解決

來源:互聯網
上載者:User
基礎求教
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。
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.