added/changed code to use GMT dates, commented until we support GMT everywhere in WP
git-svn-id: http://svn.automattic.com/wordpress/trunk@912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
802cd6e185
commit
f78298e3df
|
@ -84,8 +84,10 @@ switch($action) {
|
|||
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
||||
$ss = ($ss > 59) ? $ss - 60 : $ss;
|
||||
$now = "$aa-$mm-$jj $hh:$mn:$ss";
|
||||
// for GMT dates: compute GMT time from user's timezone time with time_difference
|
||||
} else {
|
||||
$now = current_time('mysql');
|
||||
// for GMT dates: $now = gmdate('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
if (!empty($HTTP_POST_VARS['mode'])) {
|
||||
|
@ -309,10 +311,16 @@ switch($action) {
|
|||
$mn = ($mn > 59) ? $mn - 60 : $mn;
|
||||
$ss = ($ss > 59) ? $ss - 60 : $ss;
|
||||
$datemodif = ", post_date=\"$aa-$mm-$jj $hh:$mn:$ss\"";
|
||||
/* for GMT dates:
|
||||
$add_hours = intval($time_difference);
|
||||
$add_minutes = intval(60 * ($time_difference - $add_hours));
|
||||
$datemodif = ", post_date = DATE_ADD('$aa-$mm-$jj $hh:$mn:$ss', INTERVAL '-$add_hours:$add_minutes' HOUR_MINUTE)";
|
||||
*/
|
||||
} else {
|
||||
$datemodif = '';
|
||||
}
|
||||
$now = current_time('mysql');
|
||||
// for GMT dates: $now = gmdate('Y-m-d H:i:s');
|
||||
|
||||
$result = $wpdb->query("
|
||||
UPDATE $tableposts SET
|
||||
|
|
Loading…
Reference in New Issue