added/changed code to use GMT dates, commented until we support GMT everywhere in WP

git-svn-id: https://develop.svn.wordpress.org/trunk@912 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
michelvaldrighi 2004-02-23 01:53:10 +00:00
parent 42c97023d8
commit 843376822f
1 changed files with 8 additions and 0 deletions

View File

@ -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