Forums

post_date_gmt is always 0000-00-00 (6 posts)

  1. nicokaiser
    Member
    Posted 3 weeks ago #

    Since I upgraded my website to WordPress 2.5 the "post_date_gmt" field in the database is not set correctly when I create new posts. This does not happen every time, but I think it always happens when I save the draft first and then publish it later.

    Also, I sometimes cannot edit post times (editing the date works).

    Is there any additional information that I can provide to find a solution for this? This is really annoying, something seems to be fairly broken...

  2. jamesturnbull
    Member
    Posted 3 weeks ago #

    I've just discovered the same issue, which as you say seems to be related to a post being saved as a draft before publishing (perhaps on a different day?)

    I'm exploring further, and will come back with anything I find. In the meantime, this works to at least set the post_date_gmt to the post_date:

    update wp_posts set post_date_gmt = post_date WHERE post_date_gmt = '0000-00-00 0:00:00';

  3. nicokaiser
    Member
    Posted 3 weeks ago #

    Ok, great!
    I just did this query "by hand", as only a few posts were affected. There must be a broken (auto-?) save function that does not update the GMT date...

  4. jamesturnbull
    Member
    Posted 2 weeks ago #

    Are you using an object cache backend? I'm currently thinking that's where the issue is. If so, which one?

    This patch does fix the issue: http://trac.wordpress.org/ticket/6527 but I don't think it's the *right* fix.

  5. Kelson
    Member
    Posted 1 week ago #

    This problem started showing up when I turned on XCache about a week ago. There were about 5 or 6 posts that I noticed weren't showing up in my feed reader, and looking at the feed they were dated Dec 31 1969. (Oddly, the most recent one wasn't affected.) Checking out the DB showed them with zeroed-out gmt dates, which I manually fixed.

    I've applied the patch, and will keep an eye on the DB to see if that takes care of it.

    I did have a couple of other posts that weren't published, but for some reason showed post dates matching the modification date. This, interestingly, resulted in the dashboard telling me that I had one scheduled post, but producing an empty list when I tried to list them.

  6. rauru-block
    Member
    Posted 1 hour ago #

    I had the same problem. I use XCache, too.
    I doubt WordPress 2.5.* has some bugs in object caching.

Reply

You must log in to post.

About this Topic