From 79fa8206c19af503f68a2d448560383445e1bd21 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Thu, 25 Mar 2004 02:04:15 +0000 Subject: [PATCH] gmt to localtime, and some time_difference fixes that had gone unnoticed git-svn-id: http://svn.automattic.com/wordpress/trunk@999 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/template-functions-links.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/template-functions-links.php b/wp-includes/template-functions-links.php index 36af5bf785..76bcf215dd 100644 --- a/wp-includes/template-functions-links.php +++ b/wp-includes/template-functions-links.php @@ -51,7 +51,7 @@ function get_permalink($id=false) { ); if (!$id) { if ('' != get_settings('permalink_structure')) { - $unixtime = strtotime(get_date_from_gmt($post->post_date)); + $unixtime = strtotime($post->post_date); $rewritereplace = array( date('Y', $unixtime), date('m', $unixtime), @@ -66,7 +66,7 @@ function get_permalink($id=false) { } else { // if an ID is given $idpost = $wpdb->get_row("SELECT post_date, post_name FROM $tableposts WHERE ID = $id"); if ('' != get_settings('permalink_structure')) { - $unixtime = strtotime(get_date_from_gmt($idpost->post_date)); + $unixtime = strtotime($idpost->post_date); $rewritereplace = array( date('Y', $unixtime), date('m', $unixtime), @@ -83,8 +83,8 @@ function get_permalink($id=false) { function get_month_link($year, $month) { global $querystring_start, $querystring_equal; - if (!$year) $year = date('Y', time()+($time_difference * 3600)); - if (!$month) $month = date('m', time()+($time_difference * 3600)); + if (!$year) $year = gmdate('Y', time()+($time_difference * 3600)); + if (!$month) $month = gmdate('m', time()+($time_difference * 3600)); if ('' != get_settings('permalink_structure')) { $off = strpos(get_settings('permalink_structure'), '%monthnum%'); $offset = $off + 11; @@ -101,9 +101,9 @@ function get_month_link($year, $month) { function get_day_link($year, $month, $day) { global $querystring_start, $querystring_equal; - if (!$year) $year = date('Y', time()+($time_difference * 3600)); - if (!$month) $month = date('m', time()+($time_difference * 3600)); - if (!$day) $day = date('j', time()+($time_difference * 3600)); + if (!$year) $year = gmdate('Y', time()+($time_difference * 3600)); + if (!$month) $month = gmdate('m', time()+($time_difference * 3600)); + if (!$day) $day = gmdate('j', time()+($time_difference * 3600)); if ('' != get_settings('permalink_structure')) { $off = strpos(get_settings('permalink_structure'), '%day%'); $offset = $off + 6;