The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Contact Form DB
[Plugin: Contact Form 7 to Database Extension] Timezone ID '' is invalid in /mnt/ (2 posts)

  1. Eric McNiece
    Posted 4 years ago #

    Hey guys. This is the first time ever seeing this error, it popped up after I moved a site. Some plugins were having trouble so I reinstalled just about everything.

    When I take a look at the database entries for a given form, I see an error for each database entry:

    Notice: date_default_timezone_set() [function.date-default-timezone-set]: Timezone ID '' is invalid in /mnt/stor2-wc1-dfw1/391946/392285/www.website.com/web/content/wp-content/plugins/contact-form-7-to-database-extension/CF7DBPlugin.php on line 631

    Is there somewhere that I'm supposed to specify a timezone ID?


  2. Eric McNiece
    Posted 4 years ago #

    Ok, I'm sure this problem goes way deeper than this plugin... if get_option('timezone_string') doesn't work, then something's definitely wrong.

    However, I managed to fix this by editing CF7DBPlugin.php a bit, on line 631.


    // Convert time to local timezone


    // Convert time to local timezone
    $tz = get_option('timezone_string');
    if($tz == '') $tz = 'America/Vancouver';

    This simply allows the plugin to default to a timezone if one hasn't been set. It's not coincidence that it lines up with MY timezone :).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form DB
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic