Index: wp-admin/includes/post.php
===================================================================
--- wp-admin/includes/post.php	(revision 7290)
+++ wp-admin/includes/post.php	(working copy)
@@ -81,6 +81,23 @@
 		$hh = $_POST['hh'];
 		$mn = $_POST['mn'];
 		$ss = $_POST['ss'];
+		// Adjust year for limits of MySQL's DATETIME type
+		// (http://dev.mysql.com/doc/refman/4.1/en/datetime.html)
+		$aa = ($aa < 1000) ? 1000 : $aa;
+		$aa = ($aa > 9999) ? 9999 : $aa;
+		// Further adjustments, to make sure that adjustments
+		// with time offset don't push date's outside of MySQL's
+		// DATETIME type.
+		if ($aa == 1000 && $jj == 1 && $mm ==1 && $hh < 12) { 
+			$hh = 12;
+			$mn = 00;
+			$ss = 00;
+		}
+		if ($aa == 9999 && $jj == 31 && $mm ==12 && $hh >= 12) {
+			$hh = 12;
+			$mn = 00;
+			$ss = 00;
+		}
 		$jj = ($jj > 31 ) ? 31 : $jj;
 		$hh = ($hh > 23 ) ? $hh -24 : $hh;
 		$mn = ($mn > 59 ) ? $mn -60 : $mn;
@@ -288,6 +305,23 @@
 		$hh = $_POST['hh'];
 		$mn = $_POST['mn'];
 		$ss = $_POST['ss'];
+		// Adjust year for limits of MySQL's DATETIME type
+		// (http://dev.mysql.com/doc/refman/4.1/en/datetime.html)
+		$aa = ($aa < 1000) ? 1000 : $aa;
+		$aa = ($aa > 9999) ? 9999 : $aa;
+		// Further adjustments, to make sure that adjustments
+		// with time offset don't push date's outside of MySQL's
+		// DATETIME type.
+		if ($aa == 1000 && $jj == 1 && $mm ==1 && $hh < 12) { 
+			$hh = 12;
+			$mn = 00;
+			$ss = 00;
+		}
+		if ($aa == 9999 && $jj == 31 && $mm ==12 && $hh >= 12) {
+			$hh = 12;
+			$mn = 00;
+			$ss = 00;
+		}
 		$jj = ($jj > 31 ) ? 31 : $jj;
 		$hh = ($hh > 23 ) ? $hh -24 : $hh;
 		$mn = ($mn > 59 ) ? $mn -60 : $mn;

