dポイントプレゼントキャンペーン実施中!

PHP5を使っています。

error_reporting(E_STRICT);
をつけると、2つのエラー?が画面に表示されます。
これが表示されるということは、何か原因があると思います。
phpのコードで根本から直したいので、対処方法をご存知の方、教えてください。
error_reportingをコメントとかは、したくないです。


(1)
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 'Asia/Tokyo' for 'JST/9.0/no DST'


(2)
Strict Standards: mktime() [function.mktime]: 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 'Asia/Tokyo' for 'JST/9.0/no DST'

A 回答 (1件)

「Strict Standards: date」


でGoogleにて検索いたしました結果、
http://www.res-system.com/weblog/item/563
こちらのブログのエントリーが上位に上がりました。
スクリプト側でのみでどうにかするなら
date関数、mktime関数の前に
date_default_timezone_set('Asia/Tokyo');
を記述してやればよいと思います。

この手エラーメッセージは、エラーメッセージを適当な長さで区切って検索すると、同様な現象を見た方が何かしらのアウトプットをしていることが多いので、まずはコピーして検索してみると良いと思います。
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!