Updating Timezone for PBX

****This has now been scripted****

From the container, run ringfree-tz-change {eastern|central|mountain|pacific} to alter all necessary files and restart services.


Very occasionally, the timezone for a PBX is will be incorrect. By default, the template uses Eastern time (GMT -5). If the customer is using any time conditions and is not in that timezone, then they will need to be updated so that the PBX knows their local time and can trigger at the right time per those time conditions. All of these commands will need to be run in the container in question.

Step 1: Set up a symbolic link from /etc/localtime to the correct timezone

The command looks something like this:

ln -sf /usr/share/zoneinfo/Country/City /etc/localtime

For instance, if you wanted to set a PBX to Pacific time, you would use the following command:

ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime

If you are not sure which city to use, you can use ls or ll in the /usr/share/zoneinfo/America directory to find all the possible options.

Step 2: Update the php.ini file

The php.ini file lives in the /etc directory. So open /etc/php.ini with your preferred cli text editor, and find the timezone section. You can search for ‘timezone’ or ‘date.timezone’ as both will take you to the appropriate section. You will then need to update the date.timezone setting to reflect the new timezone. For instance, if you were updating a PBX to Pacific time, you would change

date.timezone = US/Eastern


date.timezone = US/Pacific

Remember to save your changes, and close the file.

Step 3: Restart httpd

Once you’ve updated this files, run the following command:

service httpd restart

Step 4: Confirm new timezone

From the cli, run the date command and confirm that the timezone in the output is correct. Then check the Applications -> Time Groups section on the PBX to confirm that the time indicated is in the right timezone.