Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 3671)
+++ wp-includes/query.php	(working copy)
@@ -868,15 +868,17 @@
 				$pgstrt = (intval($page) -1) * $q['posts_per_page'] . ', ';
 				$limits = 'LIMIT '.$pgstrt.$q['posts_per_page'];
 			} elseif ($q['what_to_show'] == 'days') {
-				$startrow = $q['posts_per_page'] * (intval($page)-1);
-				$start_date = $wpdb->get_var("SELECT max(post_date) FROM $wpdb->posts $join WHERE (1=1) $where GROUP BY year(post_date), month(post_date), dayofmonth(post_date) ORDER BY post_date DESC LIMIT $startrow,1");
-				$endrow = $startrow + $q['posts_per_page'] - 1;
-				$end_date = $wpdb->get_var("SELECT min(post_date) FROM $wpdb->posts $join WHERE (1=1) $where GROUP BY year(post_date), month(post_date), dayofmonth(post_date) ORDER BY post_date DESC LIMIT $endrow,1");
+//				$startrow = $q['posts_per_page'] * (intval($page)-1);
+//				$start_date = $wpdb->get_var("SELECT max(post_date) FROM $wpdb->posts $join WHERE (1=1) $where GROUP BY year(post_date), month(post_date), dayofmonth(post_date) ORDER BY post_date DESC LIMIT $startrow,1");
+//				$endrow = $startrow + $q['posts_per_page'] - 1;
+//				$end_date = $wpdb->get_var("SELECT min(post_date) FROM $wpdb->posts $join WHERE (1=1) $where GROUP BY year(post_date), month(post_date), dayofmonth(post_date) ORDER BY post_date DESC LIMIT $endrow,1");
 
+				$start_days = $q['posts_per_page'] * (intval($page)-1);
+				$end_days = $start_days + $q['posts_per_page'] -1;
 				if ($page > 1) {
-					$where .= " AND post_date >= '$end_date' AND post_date <= '$start_date'";
+					$where .= " AND post_date >= DATE_SUB(NOW(), INTERVAL '$end_days' DAY) AND post_date <= DATE_SUB(NOW(), INTERVAL '$start_days' DAY)"; 
 				} else {
-					$where .= " AND post_date >= '$end_date'";
+					$where .= " AND post_date >= DATE_SUB(NOW(), INTERVAL '$end_days' DAY)";
 				}
 			}
 		}
Index: wp-includes/template-functions-links.php
===================================================================
--- wp-includes/template-functions-links.php	(revision 3671)
+++ wp-includes/template-functions-links.php	(working copy)
@@ -477,7 +477,8 @@
 	} else {
 		$posts = $wp_query->posts;
 		preg_match('#WHERE\s(.*)\sGROUP BY#siU', $wp_query->request, $matches);
-		$where = preg_replace('/( AND )?post_date >= (\'|\")(.*?)(\'|\")( AND post_date <= (\'\")(.*?)(\'\"))?/siU', '', $matches[1]);
+		//$where = preg_replace('/( AND )?post_date >= (\'|\")(.*?)(\'|\")( AND post_date <= (\'\")(.*?)(\'\"))?/siU', '', $matches[1]);
+		$where = preg_replace('/( AND )?post_date >= (.*?)( AND post_date <= (.*?))?/siU', '', $matches[1]);
 		$num_days = $wpdb->query("SELECT DISTINCT post_date FROM $wpdb->posts WHERE $where GROUP BY year(post_date), month(post_date), dayofmonth(post_date)");
 		return ceil($num_days / get_option('posts_per_page'));
 	}

