| 1 | == Editing php.ini to set the timezone == |
| 2 | When I re-installed php, I got this error when rendering Ipeer. |
| 3 | {{{ |
| 4 | ( ! ) Warning: strtotime() [function.strtotime]: 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 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /srv/http/compatibility/cake/basics.php on line 796 |
| 5 | Call Stack |
| 6 | # Time Memory Function Location |
| 7 | 1 0.0004 338248 {main}( ) ../index.php:0 |
| 8 | 2 0.0644 3930616 Dispatcher->dispatch( ) ../index.php:84 |
| 9 | 3 0.0763 4433524 Controller->constructClasses( ) ../dispatcher.php:217 |
| 10 | 4 0.0764 4442404 Model->__construct( ) ../controller.php:298 |
| 11 | 5 0.0874 5000600 Model->setSource( ) ../model_php5.php:326 |
| 12 | 6 0.0875 5000716 DboMysql->listSources( ) ../model_php5.php:532 |
| 13 | 7 0.0875 5000716 DboSource->listSources( ) ../dbo_mysql.php:149 |
| 14 | 8 0.0876 5001068 cache( ) ../dbo_source.php:141 |
| 15 | 9 0.0876 5001188 strtotime ( ) ../basics.php:796 |
| 16 | }}} |
| 17 | |
| 18 | |
| 19 | So I modified this in `/etc/php/php.ini` to fix it: |
| 20 | {{{ |
| 21 | [Date] |
| 22 | ; Defines the default timezone used by the date functions |
| 23 | ; http://php.net/date.timezone |
| 24 | date.timezone = "America/Vancouver" |
| 25 | }}} |
| 26 | (Use your own timezone, obviously. :-) |
| 27 | |