WordPress.org

Ready to get started?Download WordPress

Forums

Wordbooker
[resolved] Timing Issue (16 posts)

  1. agMedia34
    Member
    Posted 1 year ago #

    Just got the plugin and everything is great. Except ... Timing on the comments is off a bit.

    I posted a test post on my site and it went to facebook.

    Then I commented on it (on the site) ... and that went to facebook too.

    Then from facebook, I commented on the initial comment ... and it went back to my site.

    So now my site has both comments posted, but the one I made from that site was at 5:57pm (correct), and the one from facebook is saying it was posted at 12:03 pm (NOT correct) ... and causing improper ordering of the comments.

    I did check the correct time zone in my wp settings. Any ideas?

    http://wordpress.org/extend/plugins/wordbooker/

  2. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    That's going to be the post from FB coming over with the wrong time.

    Which version of Wordbooker are you using? I could push a test version out for you to test with a TZ offset for FB comments

  3. agMedia34
    Member
    Posted 1 year ago #

    Thank you. Its the latest version - just downloaded yesterday. I think its fine as it is, but if you have plans to address that, Ill just hold off for the update.

    I just think its confusing for people that interact on our site and facebook that the comments may be "shuffled".

    So are you saying that facebook is marking the wrong time stamp? If your updated plugin automatically adjusts for the difference, what would happen then when facebook "fixes" it on their end?

  4. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    The comment timestamps already have code in place to put in the appropriate time shift. I assume you are on the US Eastern Seaboard....

  5. agMedia34
    Member
    Posted 1 year ago #

    US Central Time actually. Can you just explain what/where I need to edit for my particular timezone in your file?

    Thanks

  6. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    In the wordbooker_comments.php file there is this code:

    $time = date("Y-m-d H:i:s",strtotime($single_comment->created_time));
    $current_offset = get_option('gmt_offset');
    $atime = date("Y-m-d H:i:s",strtotime($single_comment->created_time)+(3600*$current_offset));
    $data = array(
    'comment_post_ID' => $wp_post_row->wp_post_id,					'comment_author' => $single_comment->from->name,
    'comment_author_email' => $commemail,
    'comment_author_url' => 'https://www.facebook.com/'.$single_comment->from->id,
    'comment_content' =>$single_comment->message,
    'comment_author_IP' => '127.0.0.1',
    'comment_date' => $atime,
    'comment_date_gmt' => $time,
    'comment_parent'=> 0,
    'user_id' => 0,
    'comment_agent' => 'Wordbooker plugin '.WORDBOOKER_CODE_RELEASE,
    'comment_approved' => $comment_approve,
    );

    so comment_date should have the comment time and comment_date_gmt should have the time offset to GMT.

    It might be worth checking to see what those two columns look like in the database - FB might be returning the wrong time.. What we'd need to see is the raw comments feed from FB to work out what it going on.

  7. agMedia34
    Member
    Posted 1 year ago #

    Okay, thank you. So what do you need from me? I dont have any live comments being fed yet - I just had the couple test ones from yesterday.

  8. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    It would be interesting to know the two time stamps for the two comments in your database.... also which theme are you using?

  9. agMedia34
    Member
    Posted 1 year ago #

    Im using a very heavily modified version of the MADE theme.
    http://www.industrialthemes.com/made/

    Ill do a couple more test comments later tonight. What database table am I looking in to find the stamps for you?

  10. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    its the regular wordpress comments table - you should be able to work out which two comments you're looking for

  11. agMedia34
    Member
    Posted 1 year ago #

    It may not be with your plugin at all. I just noticed in my activity stream (buddypress) that an action I "just did" was being posted as having happened 6 hours ago.

    In my WP settings I had "chicago" selected as my time ... I switched to UTC-6 (which is the same thing) and it fixed the activity times. Im hoping the same will be true with comments, but I havent gotten to testing those again yet. Will keep you posted.

  12. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    But those time zones should correspond to the same thing... unless there is something screwy inside WordPress.....I'll see if I can work out what is going on.

  13. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    Chicago here returns an offset of -6 which is right.....

  14. agMedia34
    Member
    Posted 1 year ago #

    Weird. UTC-6 works fine, but selecting Chicago sets everything off by 6 hours. It wasn't your plugin at all ... did it with my buddypress activity stream as well, but its all fixed now. Everything is as it should be. Just curious now on the whole Chicago thing ... but that's not you and the plugin is fantastic.

    Thanks again for your help.

  15. Steve
    Member
    Plugin Author

    Posted 1 year ago #

    Is your blog a very old one that has been upgraded? I've seen some reports that very old WP installs that have been upgraded seem to have some Time zone problems.

    Setting it to -6 means that you'll have to manually adjust for DST though which is a pain. If you set it to Chicago do the two times show correctly on the page where you set the blog time zone?

  16. agMedia34
    Member
    Posted 1 year ago #

    Install is only a month or 2 old, and yes, on the settings screen when I select Chicago it shows fine. Only in the bp activity and the wordbooker comments pulled from facebook.

    No worries though - as long as the UTC-6 works, Im good with that.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags