WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Tools
[resolved] Upgraded tweets all show today's date (13 posts)

  1. Ladewig
    Member
    Posted 1 year ago #

    After Twitter Tools upgraded 31,313 tweets, everythign seemd OK until I looked at the tweets. The upgrade set the date to the date/time when the new twitter post was added and not the actual date/time of the original tweet. So now it look lsike I have 31,313 tweets in the last several hours. Not exactly what I thought it was going to do.

    http://wordpress.org/extend/plugins/twitter-tools/

  2. Ladewig
    Member
    Posted 1 year ago #

    I did some more checking and it appears that post_date_gmt is correct, but post_date is not. for example:

    post_date 2012-10-18 15:50:44
    post_date_gmt 2012-10-18 19:22:32

    post_date 2012-10-18 15:50:45
    post_date_gmt 2012-10-18 19:20:35

    post_date 2012-10-18 15:50:46
    post_date_gmt 2012-10-18 19:17:27

    I can update these via a query, but it would seem there is an issue with the upgrade process.

  3. Alex King
    Member
    Plugin Author

    Posted 1 year ago #

    Hmm, that was just changed in 3.0.1 - based on my (limited) testing the post_date was working as expected when only the post_date_gmt was set.

    https://github.com/crowdfavorite/wp-twitter-tools/commit/8986ffeb99d145b5310897eeed8e7b60a9eeb755

    What version of WordPress are you using? Definitely want to fix this for a quick 3.0.2 if needed.

  4. Ladewig
    Member
    Posted 1 year ago #

    Using WordPress 3.42.

    After i fixed the post_date values of the tweets, I noticed that Tweets were not being imported automatically. Figured I'd look into that later and just clicked the button to manually check for Tweets.

    When I looked at the values for these new tweets, post_date was incorrect for these new tweets. Same situation, post_date_gmt reflected the datetime for the original tweet. post_date showed the local time that the tweet was added to WordPress.

  5. Ladewig
    Member
    Posted 1 year ago #

    Why wouldn't you set both fields? If you know post_date_gmt, then you should know post_date.

  6. davidkingsbury
    Member
    Posted 1 year ago #

    I experienced this now after manually fetching new tweets (the 15 minute cron call still isn't working for me), when I saw most current tweets were being sorted in the wrong order. Copying post_date_gmt to post-date got them back in the right order...

  7. Alex King
    Member
    Plugin Author

    Posted 1 year ago #

    Why wouldn't you set both fields?

    It didn't appear necessary.

    On my server it still doesn't appear necessary (the dates all match up as you'd expect). I wonder what the difference is...

  8. Brad Touesnard
    Member
    Posted 1 year ago #

    I'm having the same issue here. Not setting the post_date explicitly means it uses the current date/time, so in the DB you end up with post_date with current date/time and post_date_gmt with the tweet date/time. Looking at WP's code for wp_insert_post, if you don't set the post_date it sets it to the current date/time: https://github.com/WordPress/WordPress/blob/3.4.2/wp-includes/post.php#L2546

    So, if you set only the post_date, wp_insert_post should pick it up and automatically set the correct GMT date/time. Looks like it was right before the change in 3.0.1?

  9. Brad Touesnard
    Member
    Posted 1 year ago #

    In related news, I noticed get_date_from_gmt() doesn't respect daylight savings time and found that there's been a patch in Trac for the past 7 months to fix it: http://core.trac.wordpress.org/ticket/20328

  10. Brad Touesnard
    Member
    Posted 1 year ago #

    FYI, just submitted a pull request to fix these issues:
    https://github.com/crowdfavorite/wp-twitter-tools/pull/16

  11. Alex King
    Member
    Plugin Author

    Posted 1 year ago #

    Should be fixed in 3.0.2.

  12. Brad Touesnard
    Member
    Posted 1 year ago #

    Just tested an upgrade and the dates look good. Thanks!

  13. Ladewig
    Member
    Posted 1 year ago #

    Same here. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.