more GMT fixoragization

git-svn-id: https://develop.svn.wordpress.org/trunk@938 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
michelvaldrighi 2004-02-26 13:07:11 +00:00
parent 8362ebf1e7
commit d7a322fe18
2 changed files with 11 additions and 11 deletions

View File

@ -1127,10 +1127,10 @@ function start_wp() {
); );
} }
$authordata = get_userdata($post->post_author); $authordata = get_userdata($post->post_author);
$post->post_date_gmt = $post->post_date; $post->post_date_local = get_date_from_gmt($post->post_date);
$post->post_date = 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); $day = mysql2date('d.m.y', $post->post_date_local);
$currentmonth = mysql2date('m', $post->post_date); $currentmonth = mysql2date('m', $post->post_date_local);
$numpages = 1; $numpages = 1;
if (!$page) if (!$page)
$page = 1; $page = 1;

View File

@ -504,7 +504,7 @@ function allowed_tags() {
function the_date_xml() { function the_date_xml() {
global $post; 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; //echo ""+$post->post_date;
} }
@ -514,9 +514,9 @@ function the_date($d='', $before='', $after='', $echo = true) {
if ($day != $previousday) { if ($day != $previousday) {
$the_date .= $before; $the_date .= $before;
if ($d=='') { 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 { } else {
$the_date .= mysql2date($d, $post->post_date); $the_date .= mysql2date($d, get_date_from_gmt($post->post_date));
} }
$the_date .= $after; $the_date .= $after;
$previousday = $day; $previousday = $day;
@ -532,9 +532,9 @@ function the_date($d='', $before='', $after='', $echo = true) {
function the_time($d='', $echo = true) { function the_time($d='', $echo = true) {
global $id, $post; global $id, $post;
if ($d=='') { 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 { } 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); $the_time = apply_filters('the_time', $the_time);
if ($echo) { if ($echo) {
@ -546,7 +546,7 @@ function the_time($d='', $echo = true) {
function the_weekday() { function the_weekday() {
global $weekday, $id, $post; 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); $the_weekday = apply_filters('the_weekday', $the_weekday);
echo $the_weekday; echo $the_weekday;
} }
@ -556,7 +556,7 @@ function the_weekday_date($before='',$after='') {
$the_weekday_date = ''; $the_weekday_date = '';
if ($day != $previousweekday) { if ($day != $previousweekday) {
$the_weekday_date .= $before; $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; $the_weekday_date .= $after;
$previousweekday = $day; $previousweekday = $day;
} }