From beffb648e5eb4e49b7067e41530cfff6fa58ace2 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: https://develop.svn.wordpress.org/trunk@926 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 "