From d7a322fe18c9b8eabd20049ecad9a26d629b8702 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Thu, 26 Feb 2004 13:07:11 +0000 Subject: [PATCH] more GMT fixoragization git-svn-id: https://develop.svn.wordpress.org/trunk@938 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 8 ++++---- wp-includes/template-functions-general.php | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c26b9362a7..f02a888818 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1127,10 +1127,10 @@ function start_wp() { ); } $authordata = get_userdata($post->post_author); - $post->post_date_gmt = $post->post_date; - $post->post_date = get_date_from_gmt($post->post_date); - $day = mysql2date('d.m.y', $post->post_date); - $currentmonth = mysql2date('m', $post->post_date); + $post->post_date_local = get_date_from_gmt($post->post_date); +# $post->post_date = get_date_from_gmt($post->post_date); + $day = mysql2date('d.m.y', $post->post_date_local); + $currentmonth = mysql2date('m', $post->post_date_local); $numpages = 1; if (!$page) $page = 1; diff --git a/wp-includes/template-functions-general.php b/wp-includes/template-functions-general.php index 4279b3c9c1..b7f675558f 100644 --- a/wp-includes/template-functions-general.php +++ b/wp-includes/template-functions-general.php @@ -504,7 +504,7 @@ function allowed_tags() { function the_date_xml() { global $post; - echo mysql2date('Y-m-d',$post->post_date); + echo mysql2date('Y-m-d', get_date_from_gmt($post->post_date)); //echo ""+$post->post_date; } @@ -514,9 +514,9 @@ function the_date($d='', $before='', $after='', $echo = true) { if ($day != $previousday) { $the_date .= $before; if ($d=='') { - $the_date .= mysql2date(get_settings('date_format'), $post->post_date); + $the_date .= mysql2date(get_settings('date_format'), get_date_from_gmt($post->post_date)); } else { - $the_date .= mysql2date($d, $post->post_date); + $the_date .= mysql2date($d, get_date_from_gmt($post->post_date)); } $the_date .= $after; $previousday = $day; @@ -532,9 +532,9 @@ function the_date($d='', $before='', $after='', $echo = true) { function the_time($d='', $echo = true) { global $id, $post; if ($d=='') { - $the_time = mysql2date(get_settings('time_format'), $post->post_date); + $the_time = mysql2date(get_settings('time_format'), get_date_from_gmt($post->post_date)); } else { - $the_time = mysql2date($d, $post->post_date); + $the_time = mysql2date($d, get_date_from_gmt($post->post_date)); } $the_time = apply_filters('the_time', $the_time); if ($echo) { @@ -546,7 +546,7 @@ function the_time($d='', $echo = true) { function the_weekday() { global $weekday, $id, $post; - $the_weekday = $weekday[mysql2date('w', $post->post_date)]; + $the_weekday = $weekday[mysql2date('w', get_date_from_gmt($post->post_date))]; $the_weekday = apply_filters('the_weekday', $the_weekday); echo $the_weekday; } @@ -556,7 +556,7 @@ function the_weekday_date($before='',$after='') { $the_weekday_date = ''; if ($day != $previousweekday) { $the_weekday_date .= $before; - $the_weekday_date .= $weekday[mysql2date('w', $post->post_date)]; + $the_weekday_date .= $weekday[mysql2date('w', get_date_from_gmt($post->post_date))]; $the_weekday_date .= $after; $previousweekday = $day; }