From e355cca1c03af7a5419e857ed5b717471bb48082 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Mon, 23 Feb 2004 15:58:26 +0000 Subject: [PATCH] fixed touch_time to use user's timezone instead of GMT git-svn-id: http://svn.automattic.com/wordpress/trunk@926 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d8fff84ac7..6ebcfc608f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -425,12 +425,13 @@ function touch_time($edit = 1) { echo '

?
'; $time_adj = time() + ($time_difference * 3600); - $jj = ($edit) ? mysql2date('d', $postdata['Date']) : date('d', $time_adj); - $mm = ($edit) ? mysql2date('m', $postdata['Date']) : date('m', $time_adj); - $aa = ($edit) ? mysql2date('Y', $postdata['Date']) : date('Y', $time_adj); - $hh = ($edit) ? mysql2date('H', $postdata['Date']) : date('H', $time_adj); - $mn = ($edit) ? mysql2date('i', $postdata['Date']) : date('i', $time_adj); - $ss = ($edit) ? mysql2date('s', $postdata['Date']) : date('s', $time_adj); + $post_date_localtime = get_date_from_gmt($postdata['Date']); + $jj = ($edit) ? mysql2date('d', $post_date_localtime) : date('d', $time_adj); + $mm = ($edit) ? mysql2date('m', $post_date_localtime) : date('m', $time_adj); + $aa = ($edit) ? mysql2date('Y', $post_date_localtime) : date('Y', $time_adj); + $hh = ($edit) ? mysql2date('H', $post_date_localtime) : date('H', $time_adj); + $mn = ($edit) ? mysql2date('i', $post_date_localtime) : date('i', $time_adj); + $ss = ($edit) ? mysql2date('s', $post_date_localtime) : date('s', $time_adj); echo ''."\n"; echo "