--- bot_log.module-old	2007-11-09 12:22:24.000000000 -0500
+++ bot_log.module	2008-01-29 17:32:00.000000000 -0500
@@ -186,6 +186,7 @@ function bot_log_insert($type, $channel,
  */
 function bot_log_day($channel = NULL, $day = NULL) {
   $output = NULL;
+  global $user;
 
   // if there's no channel...
   if (!$channel) { // ... we'll show a list of all we're logging.
@@ -199,9 +200,16 @@ function bot_log_day($channel = NULL, $d
 
   // there is a channel! and the user can view it! holy crap!
   if (isset($channel) && user_access("view bot logs: #$channel")) {
-    // all time calcs are in GMT.
+    // Figure out what the timezone is.
+    if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) {
+      $timezone = $user->timezone;
+    }
+    else {
+      $timezone = variable_get('date_default_timezone', 0);
+    }
+
     $day = $day ? $day : date('Y-m-d');
-    $day_start = strtotime("$day GMT");
+    $day_start = strtotime("$day GMT") - $timezone;
     $day_end   = $day_start + (60 * 60 * 24);
 
     // see bot_log_irc_msg_quit() for why we use a LIKE %#channel here for lookups.
@@ -232,11 +240,27 @@ function bot_log_day($channel = NULL, $d
  *   A themed log for display.
  */
 function theme_bot_log_day($channel, $date, $logs, $format = 'html') {
+  global $user;
+
   include_once("Net/SmartIRC/defines.php"); // type constants.
   $output = NULL;
+  
+  // Figure out what the timezone is. We're interested in the offset, not the seconds difference, so we'll
+  // convert that now.
+  if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) {
+    $timezone = $user->timezone / 3600;
+  }
+  else {
+    $timezone = variable_get('date_default_timezone', 0) / 3600;
+  }
 
   if ($format == 'html') {
-    drupal_set_title(t('IRC log for @channel, @date (GMT)', array('@channel' => '#'. $channel, '@date' => $date)));
+    if ($timezone > 0) {
+      drupal_set_title(t('IRC log for @channel, @date (GMT+' . $timezone . ')', array('@channel' => '#'. $channel, '@date' => $date)));
+    }
+    else {
+      drupal_set_title(t('IRC log for @channel, @date (GMT' . $timezone . ')', array('@channel' => '#'. $channel, '@date' => $date)));
+    }
     drupal_add_css(drupal_get_path('module', 'bot_log') .'/bot_log.css');
     $output .= drupal_get_form('bot_log_filter_form', $channel, $date);
     $rows = array(); // goodies sent to theme_table().
