This topic is locked

LocalTime PHP Error

3/23/2006 5:15:05 PM
PHPRunner General questions
M
mckirkus author

I just moved to PHP5 and MySQL 5. Everything seems to work except for the date field.

The code spits out this error:

localtime() [function.localtime]: 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 'America/Los_Angeles' for '-8.0/no DST' instead



Error # 2048

Line 225 of locale.php.
Is this fixable or should I go back to an older version of PHP?
Thanks for the great product by the way, it's a huge time saver.

M
mckirkus author 3/23/2006

Just figured it out. With the latest version of PHP you have to tweak php.ini
Uncomment ;date.timezone =

and change it to

date.timezone = "America/Los_Angeles" or whatever your timezone is.
The full list of supported timezones can be found here

http://www.php.net/manual/en/timezones.php
UPDATE:

For those worried about upgrading I just want to confirm that PHPRunner works great with PHP 5.1.2 and MySQL 5.0.18.