TIME ZONE DISPLAY IN REGIONAL SETTINGS - Dec 29th, 2018


I was curious as to why “Regional Settings” on some CMSB installs show as: “Timezone Name” with a pull down for
a long list of locations and times and on others as: “Server Time” and “Local Time Adjustment”.

Dave Edis from Interactive Tools had the answer (as always).

He said:

It's actually based on the version of PHP you have. If you have PHP 5.1+ it will show the timezone pulldown because that
version supports timezones with:

http://php.net/date-default-timezone-set

Earlier PHP versions don't support timezones so we hand-coded a workaround that lets you put in the offset amount in
hours and minutes.

Interestingly, the code in general.php actually decides what to show by checking if that built-in PHP function exists:


<?php if (function_exists('date_default_timezone_set')): ?>



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service