Posted by: kezhong | October 14, 2010

Solving the problem of time zone error on Trixbox

Recently, when I checked the VOIP server installed the trixbox 2.8.0.3, I had found there were lots of error messages in the log file.
… …
Oct 14 14:43:15 trixbox1 php: /var/lib/asterisk/agi-bin/phpagi-asmanager.php[731]: 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 ‘America/New_York’ for ‘EDT/-4.0/DST’ instead
… …

I searched the solution on the internet, and had solved the problem.

1. edit /etc/php.ini
2. Find and add your timeZone
[Date]
; Defines the default timezone used by the date functions
;date.timezone =
date.timezone = “America/Toronto”

After added it, the above error messages didn’t appear any more.

The full list of supported time zones is available as below:
http://www.php.net/manual/en/timezones.php
You can replace “America/Toronto” with your desired timezone.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: