tadej.eu

A blog about game development, web technology
and entrepreneurship by Tadej Gregorcic

Wordpress Timezone Exception Fix/Hack

by Tadej Gregorcic on December 24, 2009

For some reason , all of a sudden Wordpress installations start displaying a weird exception in options general

(when you click Settings):

Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Europe/Paris)' in [path/options.general]

If you are not that worried about time zones and just want to be able to post articles while this bug is driving you crazy, open wp-admin/options-general.php and change line 171 from:

if (function_exists('timezone_transitions_get')) {

into

if (false/*ignorant fix*/&& function_exists('timezone_transitions_get')) {

This works in Wordpress 2.9 – the fix for 2.8 is analogous but I’m afraid not exactly the same.

If someone has more time to investigate this issue, let’s discuss this in the comments.

  • Thanks! Spent hours searching for a fix. This one's the only one that worked.
  • Glad to see someone benefit from this, cheers :)
blog comments powered by Disqus

Previous post:

Next post: