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
This commit is contained in:
michelvaldrighi 2004-02-23 15:58:26 +00:00
parent 950a4c9ea9
commit beffb648e5
1 changed files with 7 additions and 6 deletions

View File

@ -425,12 +425,13 @@ function touch_time($edit = 1) {
echo '<p><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" '.$checked.'/> <label for="timestamp">Edit timestamp</label> <a href="http://wordpress.org/docs/reference/post/#edit_timestamp" title="Help on changing the timestamp">?</a><br />'; echo '<p><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" '.$checked.'/> <label for="timestamp">Edit timestamp</label> <a href="http://wordpress.org/docs/reference/post/#edit_timestamp" title="Help on changing the timestamp">?</a><br />';
$time_adj = time() + ($time_difference * 3600); $time_adj = time() + ($time_difference * 3600);
$jj = ($edit) ? mysql2date('d', $postdata['Date']) : date('d', $time_adj); $post_date_localtime = get_date_from_gmt($postdata['Date']);
$mm = ($edit) ? mysql2date('m', $postdata['Date']) : date('m', $time_adj); $jj = ($edit) ? mysql2date('d', $post_date_localtime) : date('d', $time_adj);
$aa = ($edit) ? mysql2date('Y', $postdata['Date']) : date('Y', $time_adj); $mm = ($edit) ? mysql2date('m', $post_date_localtime) : date('m', $time_adj);
$hh = ($edit) ? mysql2date('H', $postdata['Date']) : date('H', $time_adj); $aa = ($edit) ? mysql2date('Y', $post_date_localtime) : date('Y', $time_adj);
$mn = ($edit) ? mysql2date('i', $postdata['Date']) : date('i', $time_adj); $hh = ($edit) ? mysql2date('H', $post_date_localtime) : date('H', $time_adj);
$ss = ($edit) ? mysql2date('s', $postdata['Date']) : date('s', $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 '<input type="text" name="jj" value="'.$jj.'" size="2" maxlength="2" />'."\n"; echo '<input type="text" name="jj" value="'.$jj.'" size="2" maxlength="2" />'."\n";
echo "<select name=\"mm\">\n"; echo "<select name=\"mm\">\n";