Support » Plugins » How to fix time of daily digest for twitter tools ?

  • I have these feature requests :
    1. The time of posting the daily digest should be configurable (to take care of different time zone). I tried to change the code but something went wrong. So if you could provide a “option” to choose the timing, taht would be great.
    2. The tweets which start with “@” could be avoided from the daily digest.(Since that will not make much sense on the blog). I tried some code for this, but since the daily update has stopped completely, could not verify.
    I would be glad if someone points out, how to do these

Viewing 3 replies - 1 through 3 (of 3 total)
  • mlanger


    These are great feature requests. I’d also like to see them implemented in a future version of Twitter Tools.

    Me too – the code has a bug in it in that it assumes Twitter returns the post date in local time, which apparently isn’t true, but the database comparison does use local time. It would be nice to get this one fixed as I suspect there may be missing tweets…

    Thanks and have fun! – Bob

    I got an extra day off from work (a four day weekend!) and spent some time working on this bug. I believe I have a patch that fixes the problem; this patch makes sure the date for tweets in the database is timezone-corrected, based on the timezone set in WordPress; it would be better to fix all the comparisons to work with UTC time, but that’s much more complicated and this solution is dead simple.

    Here’s the patch:

    *** twitter-tools.php.0	Sun Apr 13 20:07:12 2008
    --- twitter-tools.php	Thu Jul  3 13:06:44 2008
    *** 401,406 ****
    --- 401,409 ----
      	function add() {
      		global $wpdb, $aktt;
    + 		// RLH: The next line corrects Twitter's UTC to WordPress timezone setting
    + 		$this->tw_created_at = $this->tw_created_at + (get_option('gmt_offset') * 3600);
    + 		// RLH: End changes
      			INTO $wpdb->aktt
    *** 1353,1358 ****
    --- 1356,1364 ----
      	$now = time();
    + 	// RLH: Must shift "now" back to proper timezone to match WordPress
    + 	$now = $now +  + (get_option('gmt_offset') * 3600);
    + 	// RLH: End changes
      	$time = gmmktime(
      		substr($date, 11, 2)

    You must apply this patch to the 1.2b1 version of twitter tools.

    Thanks and have fun! – Bob

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to fix time of daily digest for twitter tools ?’ is closed to new replies.