After updating 5 blogs to WordPress v2.8 I found 3 of them offered the new timezone handling, while the other 2 did not. I wrote about timezone support in WordPress Daylight Savings is finally fixed (sort of).
Initially I tried the WordPress forums, but without luck. I’d have to solve this by myself.
Was it when I updated that made a difference?
Obviously something was different between the working and the non-working blogs, so I started by looking at the file
/wp-includes/version.php. That file shows what version of WordPress the blog is running.
In fact, on one non-working blog I tried to trick WordPress by editing the version number and date to be older than v2.8. That did indeed fool WordPress and I was able to once again choose an automatic update from within the blog’s Dashboard.
That fresh update changed nothing, thus disproving my theory that perhaps the updater had changed between the time I updated the first (non-working) blog and the later successful update on another blog.
Let’s check the Settings file
Next I figured I’d compare the relevant Settings files from the two blogs.
I opened the
/wp-admin/options-general.php from each blog into BBEdit and chose the most wonderful
Compare Two front Documents item from the Search menu. I was confident that I’d find there were differences.
Yup, that theory was wrong too:
No differences. These files are identical. OK.
The beast awakes
Next up was to look through
/wp-admin/options-general.php. I’m no PHP coder, but line 99 caught my eye:
if ( !wp_timezone_supported() ) : // no magic timezone support here
Then something stirred in the depths of my brain: these blogs are on different servers. Is it the good old ‘Different versions of PHP’ bug?
I’ve been moving all my blogs to a different hosting company. For some bizarre reason, even though the new company excels at almost everything else, not all their server machines default to PHP5.
I opened the
.htaccess file for one of the ‘broken’ blogs and added this line at the top:
AddHandler application/x-httpd-php5 .php
Then I checked the General Settings > Timezone section in the blog’s Dashboard. Success!
If you’ve updated to WordPress v2.8 and the new Timezone support isn’t available to you, check the version of PHP your blog is working with. If it’s still using PHP4 then ask the hosting company how to get PHP5 enabled.