mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
now storing emailed posts as localtime+gmt
git-svn-id: http://svn.automattic.com/wordpress/trunk@1004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
69efdb90fd
commit
b8df8fb93d
@ -107,7 +107,8 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
|
|||||||
}
|
}
|
||||||
$ddate_U = mktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y);
|
$ddate_U = mktime($ddate_H, $ddate_i, $ddate_s, $ddate_m, $ddate_d, $ddate_Y);
|
||||||
|
|
||||||
$post_date = gmdate('Y-m-d H:i:s', $ddate_U);
|
$post_date = gmdate('Y-m-d H:i:s', $ddate_U + ($time_difference * 3600));
|
||||||
|
$post_date_gmt = gmdate('Y-m-d H:i:s', $ddate_U);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,9 +227,9 @@ for ($iCount=1; $iCount<=$Count; $iCount++) {
|
|||||||
$content = preg_replace("|\n([^\n])|", " $1", $content);
|
$content = preg_replace("|\n([^\n])|", " $1", $content);
|
||||||
$content = addslashes(trim($content));
|
$content = addslashes(trim($content));
|
||||||
if($flat > 500) {
|
if($flat > 500) {
|
||||||
$sql = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category) VALUES ($post_author, '$post_date', '$content', '$post_title', $post_category)";
|
$sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_category) VALUES ($post_author, '$post_date', '$post_date_gmt', '$content', '$post_title', $post_category)";
|
||||||
} else {
|
} else {
|
||||||
$sql = "INSERT INTO $tableposts (post_author, post_date, post_content, post_title, post_category, post_lat, post_lon) VALUES ($post_author, '$post_date', '$content', '$post_title', $post_category, $flat, $flon)";
|
$sql = "INSERT INTO $tableposts (post_author, post_date, post_date_gmt, post_content, post_title, post_category, post_lat, post_lon) VALUES ($post_author, '$post_date', '$post_date_gmt', '$content', '$post_title', $post_category, $flat, $flon)";
|
||||||
}
|
}
|
||||||
$result = $wpdb->query($sql);
|
$result = $wpdb->query($sql);
|
||||||
$post_ID = $wpdb->insert_id;
|
$post_ID = $wpdb->insert_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user