moritzjacobs/cindy — pull request #7 by karlding (2014-07-22 08:07:33+00:00)
Title: Better timezone setting function

This new function will check whether the specified functions exist (``date_default_timezone_get()`` and ``date_default_timezone_set()``), and will use the timezone value, if specified, in the php.ini. If not, it will default to the Australia/Melbourne timezone that it has always used. Some server configurations will cause the ``date_default_timezone_get()`` function to return 'UTC', instead of the proper timezone, so the check aims to fix that by setting the Australia/Melbourne timezone instead.

It is necessary for a timezone to be set, because in PHP 5.3+, there's a requisite for a default timezone.

I've modified the ``php_fixes()`` function in ``app/stacey.inc.php``.