WordPress.org

Forums

WP Missed Schedule Fix Failed Future Posts
[resolved] Publishing Ahead of Schedule (TimeZone Issues) (4 posts)

  1. milewis1
    Member
    Posted 2 years ago #

    On my blog, the WordPress timezone is different than the timezone set on the MySQL server. In this case this plugin ends up publishing future items early.

    I would recommend a change to the query:

    global $wpdb;
    	$sql = $wpdb->prepare(
    		"SELECT<code>ID</code>FROM<code>{$wpdb->posts}</code>"."WHERE("."((<code>post_date</code>>0)&&(<code>post_date</code><=%s))OR"."((<code>post_date_gmt</code>>0)&&(<code>post_date_gmt</code><=%s))".")AND<code>post_status</code>='future'LIMIT 0,5",
    		current_time('mysql'),		// Blog local time
    		current_time('mysql', 1)	// UTC Time
    	);
    
    	$scheduledIDs=$wpdb->get_col($sql);

    This will use the WordPress blog's timezone instead of the MySQL server, which should give better results.

    http://wordpress.org/extend/plugins/wp-missed-schedule/

  2. sLa NGjI's
    Member
    Plugin Author

    Posted 2 years ago #

    Please, milewis1, send me full plugin code ;) Thanks :)

  3. sLa NGjI's
    Member
    Plugin Author

    Posted 2 years ago #

    This issue was inserted as Ticket #3712701 on to Todo List for Future Development.

    Thanks to milewis1 and all others users was send me same solution via Contact form ...

    If are satisfied of this plugin, please, consider one small Donation for my free work. :)

  4. sLa NGjI's
    Member
    Plugin Author

    Posted 2 years ago #

    @milewis1: try this version ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Missed Schedule Fix Failed Future Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic