Forum Replies Created

Viewing 1 replies (of 1 total)
  • bdappen

    (@bdappen)

    Looking at the plugin code, I’m guessing you have a problem with your MYSQL timezone settings… The plugin creates a query like:

    SELECT ID
    FROM wp_posts
    WHERE (
    (
    (
    post_date >0
    ) && ( post_date <= CURRENT_TIMESTAMP( ) )
    )
    OR (
    (
    post_date_gmt >0
    ) && ( post_date_gmt <= UTC_TIMESTAMP( ) )
    )
    )
    AND post_status = 'future'
    LIMIT 0 , 5

    If your mysql timezone is not specified correctly then the CURRENT_TIMESTAMP() function will come out wrong (it’s often defaulted to UTC). You can also just modify the code to replace CURRENT_TIMESTAMP() with '".date('Y-m-d H:i:s')."' or something of that effect so PHP is setting the timestamp rather than mysql.

    I wonder whether this shouldn’t be the default in the plugin? WP/php timezone settings are more likely to have been set by the user than mysql’s timezone.

Viewing 1 replies (of 1 total)