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
$wpdb->query("
INSERT
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