• HTML
  • CSS
  • Linux
  • Perl
  • Windows
  • Hardware
  • OpenSUSE
  • Slackware
  • MySQL
  • Vim
  • JavaScript
  • Network
  • Security
  • Debian
  • PHP
  • MovableType
  • Postfix
  • Lenovo X200S
  • Dovecot
  • BIND
  • Samba
  • Apache
  • MacBook Air
  • SSH
  • Raspberry Pi
  • [Linux] [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エラーが出た時の対処

    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の入門向け書籍