Date_default_timezone_set(): Timezone ID '/' is invalid

Opened SysAdmin - date
I didn’t realize that the fields were not completed and saved a blank timezone. Now GUI will not work.

Please try the following from linux shell:

fwconsole mysql
select * from sysadmin_options where sysadmin_options.key like 'tz%';

You should see two entries:

+--------------+---------+
| key          | value   |
+--------------+---------+
| tz_continent | America |
| tz_region    | Chicago |
+--------------+---------+

If either of these are wrong, do the following from within MySQL:

update sysadmin_options set value='America' where sysadmin_options.key='tz_continent';

This will change the continent to ‘America’. To change the region:

update sysadmin_options set value='Chicago' where sysadmin_options.key='tz_region';

That will give you CST. See if that gets you into the GUI again, and then adjust the settings from sysadmin as needed. Type exit to leave MySQL.

1 Like

To add one little, relatively obvious bit - you can safely set these to America and Chicago regardless of what timezone you are actually in, since the goal is to be able to get into the system and set them correctly from the GUI. If (like me) you happen to be in America and the Chicago region, you’re done.

Thank you so much for the responses. Due to the timezone issue, fwconsole would not function. The same error was thrown and fwconsole would not run. I ended up modifying the file:

 /var/www/html/admin/libraries/BMO/View.class.php

at line 153 from

 date_default_timezone_set($phptimezone);

to

 date_default_timezone_set('UTC');

This got the GUI back up and running and I was able to set it via SysAdmin. I did have to reset the signatures on the file.

I forgot to mention that I am running SNG7 - Stable.

1 Like

While effective as a “quick fix”, it should be throwing a “tampered file” warning on your system and will be overwritten when you next update your system. I recommend you “back up” your fix by making sure you have correctly set your timezone and region in your database.