• Resolved aloeroot

    (@aloeroot)


    Hi there – thanks again for this great plugin. It’s worked beautifully for the most part until I ran the upgrade last week.

    I seem to be experiencing a 4-hour discrepancy somewhere within the system, and an issue with post expirations. In WordPress’ General Settings area the time is correct.

    When I create a new post and set the expiry date, as soon as I publish the post the expiry time changes – it displays a time 4 hours earlier than what I chose. The expiry time showing becomes 10:00, for example, if I choose 14:00.

    I created a test post at 14:16 with the intention of test-expiring it at 14:18.

    As soon as I saved the post, the expiry time visible in the Post Expirator box set itself to March 18, 2013 10:18. The debug log is showing this:

    2013-03-18 14:16:26 6833 -> SCHEDULED at Mon, 18 Mar 2013 18:18:00 +0000 (1363630680) with options Array ( [expireType] => draft [id] => 6833 )

    18:18:00 seems to indicate a 4-hour time difference.

    In the cron schedule I see this: Mon, 18 Mar 2013 14:18:00 -0400 postExpiratorExpire
    0 => 6833 Single Event

    I have wp-cron disabled and the replacement cron job runs every hour. I set this to once per minute for the sake of testing, and the post expired at 14:18:00 even though it’s displaying the wrong time in the post listing screen: March 18, 2013 10:18 am.

    This may not be relevant, but my client pointed out: The Expires listing is now spelled out……April 1, 2013 instead of 04/04/2013, which isn’t that big of a problem, but the ones that have expired have not been marked draft.

    These unexpired posts do expire if I set their expiry date to sometime in the near future, but ones with an older expiry date that has already passed are not being processed if I trigger the cron job.

    This is happening on two different sites on the same server, with both regular posts and a custom post type. Any idea as to what may be the issue here? Thanks.

    http://wordpress.org/extend/plugins/post-expirator/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Can I ask why you are not using the built in wp-cron? How are you running it otherwise?

    The post expirator and wordpress crown both operate in GMT/UTC time – so, it sounds like there is something weird going on with your server/timezones.

    Can you let me know the follow:
    1) What is your PHP default timezone?
    2) What is your server timezone?
    3) What is your wordpress timezone string configured to?

    Thread Starter aloeroot

    (@aloeroot)

    I’m running it via a periodic cron job rather than using the usual trigger:

    wget -O /dev/null http://www.site.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    It’s a server-tuning thing at the request of the admin; too many high-traffic WP sites on the same machine bring the performance down.

    1. America/Toronto – on EDT as of last weekend.
    2. EDT
    3. Toronto: UTC time is 2013-03-19 13:13:20 Local time is 2013-03-19 9:13:20 (making this EDT also)

    We did change from EST to EDT last weekend; I’m noticing that newly created posts are expiring fine, and if I change the expiry date of an older post to something in the near future they expire.

    It’s starting to look as though any posts created before the change to EDT are the ones that aren’t expiring.

    Thread Starter aloeroot

    (@aloeroot)

    To add some strangeness to this, we’ve now got posts which are not due to expire for a couple of weeks putting themselves into draft mode.

    Looking at these posts, there’s a nameless entry in the revision history that seems to be attributable to the Expirator plugin, as it matches other nameless entries for posts that did expire on schedule.

    I’ll let you know if I find a cause for this.

    Thread Starter aloeroot

    (@aloeroot)

    We’ve discovered that we can set expiry times for new posts and have them expire on schedule, however they consistently display an expiry time 4 hours earlier than the time we set, despite the fact that they expire at the right time anyway.

    I disabled plugins one at a time until I discovered that turning off WP Events Calendar fixed the display problem and the posts began to show the correct expiry times.

    Thinking it was a simple plugin conflict, I installed the Ajax Event Calendar instead, as the WP Events Calendar seems to be abandonware. As soon as I activated the new calendar plugin, the time discrepancy appeared again.

    It appears to only be a display issue, although it’s confusing to my client, but this is information you may be able to use. Thanks.

    devra

    (@devra)

    We are also using Ajax Event Calendar. Expiration time goes backwards 4 hours each time the post is saved. Our clock is set to New York.

    Expiration is set to Draft, but no posts have changed to Draft yet.

    Thanks for the information – this will help me figure this out hopefully!

    Johnny P

    (@jingleballs)

    I had the same problem until I disabled another plug-in, Events Manager Extended. Prior to that the Post Expirator would subtract 4 hours each time I updated the post. I’m using it to remove categories at a certain time.

    WordPress and PHP are set to the correct time zone. I’m not sure about the server.

    I believe this issue should be fixed in 2.1.0, which has just been released.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post expiration defaults to 10 am, posts don't expire’ is closed to new replies.