カテゴリ
  • HTML/CSS
  • Linux全般
  • Perl
  • Windows
  • Hardware
  • OpenSUSE
  • Slackware
  • MySQL
  • Vim
  • JavaScript
  • Network
  • Security
  • Debian
  • PHP
  • It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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' instead in... というPHPエラーが出た時の対処

    2011/11/22 08:36
    It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting 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' instead in...
    というやたら長いPHPエラーが出た。
    タイムゾーンの設定に問題があるようで、php.iniやPHPプログラム上で解消できたのでメモ。

    // PHPファイルで対処する場合の例
    date_default_timezone_set('Asia/Tokyo');

    // php.iniで対処する場合の例
    [Date]
    date.timezone = Asia/Tokyo

    PHPの参考書籍



    よくわかるPHPの教科書
    Tags: PHP