Index: wp-admin/includes/post.php
===================================================================
--- wp-admin/includes/post.php	(revision 8244)
+++ wp-admin/includes/post.php	(working copy)
@@ -93,10 +93,14 @@
 		$hh = $_POST['hh'];
 		$mn = $_POST['mn'];
 		$ss = $_POST['ss'];
-		$jj = ($jj > 31 ) ? 31 : $jj;
-		$hh = ($hh > 23 ) ? $hh -24 : $hh;
-		$mn = ($mn > 59 ) ? $mn -60 : $mn;
-		$ss = ($ss > 59 ) ? $ss -60 : $ss;
+		if ( !checkdate( $mm, $jj, $aa ) ) {
+			$aa = date('Y');
+			$mm = date('n');
+			$jj = date('j');
+		}
+		$hh = $hh % 24;
+		$mn = $mn % 60;
+		$ss = $ss % 60;
 		$_POST['post_date'] = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss );
 		$_POST['post_date_gmt'] = get_gmt_from_date( $_POST['post_date'] );
 	}
