Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10

4 posts by 2 authors in: Forums > CMS Builder
Last Post: March 20, 2008   (RSS)

Re: [webdude] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10

By Dave - March 20, 2008

That's strange. So that must mean that you have date_default_timezone_set() but not timezone_abbreviations_list()?

The php docs say both should be available from v5.10 up but I as well have noticed the PHP docs aren't always accurate.

There's a fallback system for PHP versions that don't support the recent PHP5.1(ish) timezone functions but it checks to see if date_default_timezone_set() is defined to see if that's necessary.

Can you just try this code on your server and let me know what it prints? Save it as test.php:

<?php
echo "This is PHP v" . phpversion() . "<br/>\n";
echo "date_default_timezone_set: " . function_exists('date_default_timezone_set') . "<br/>\n";
echo "timezone_abbreviations_list: " . function_exists('timezone_abbreviations_list') . "<br/>\n";
?>


Thanks for the bug report!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10

By webdude - March 20, 2008

Hi Dave,

Well I guess this explains the bug. Here is the output to the code you asked me to run:
This is PHP v5.1.6
date_default_timezone_set: 1
timezone_abbreviations_list:

Your hypothesis seems correct. Either PHP docs are a little screwy or my php is a little screwy (or both?).

Let me know if this helps... I really appreciate your patience in troubleshooting!

Re: [webdude] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10

By Dave - March 20, 2008

We could try testing for timezone_abbreviations_list() instead of date_default_timezone_set().

Foreach each of these files, search for 'date_default_timezone_set' (with quotes) and replace it with 'timezone_abbreviations_list' (with quotes).

/lib/init.php
/lib/common.php (occurs twice in this file)
/lib/menus/admin/actionHandler.php
/lib/menus/admin/general.php

And I'll add code for that to the next version (v1.12) so you don't need to redo it when you upgrade.

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com