Title: Timing Issue
Last modified: August 20, 2016

---

# Timing Issue

 *  Resolved [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/)
 * 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/](http://wordpress.org/extend/plugins/wordbooker/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501286)
 * 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
 *  Thread Starter [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501326)
 * 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?
 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501348)
 * The comment timestamps already have code in place to put in the appropriate time
   shift. I assume you are on the US Eastern Seaboard….
 *  Thread Starter [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501349)
 * US Central Time actually. Can you just explain what/where I need to edit for 
   my particular timezone in your file?
 * Thanks
 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501350)
 * 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.
 *  Thread Starter [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501353)
 * 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.
 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501354)
 * It would be interesting to know the two time stamps for the two comments in your
   database…. also which theme are you using?
 *  Thread Starter [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501355)
 * Im using a very heavily modified version of the MADE theme.
    [http://www.industrialthemes.com/made/](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?
 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501357)
 * its the regular wordpress comments table – you should be able to work out which
   two comments you’re looking for
 *  Thread Starter [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501369)
 * 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.
 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501372)
 * 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.
 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501378)
 * Chicago here returns an offset of -6 which is right…..
 *  Thread Starter [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501387)
 * 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.
 *  Plugin Author [Steve](https://wordpress.org/support/users/steveatty/)
 * (@steveatty)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501404)
 * 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?
 *  Thread Starter [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * (@agmedia34)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501405)
 * 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.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Timing Issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordbooker.svg)
 * [Wordbooker](https://wordpress.org/plugins/wordbooker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordbooker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordbooker/)
 * [Active Topics](https://wordpress.org/support/plugin/wordbooker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordbooker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordbooker/reviews/)

 * 15 replies
 * 2 participants
 * Last reply from: [agMedia34](https://wordpress.org/support/users/agmedia34/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/timing-issue/#post-3501405)
 * Status: resolved