Fix sign problem when converting from gmt_offset to new Etc/GMT timezone. Props Otto42. see #3962

git-svn-id: http://svn.automattic.com/wordpress/trunk@10962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-04-16 22:17:13 +00:00
parent 58aec06ad9
commit 0f43de45c5
1 changed files with 2 additions and 2 deletions

View File

@ -137,8 +137,8 @@ else: // looks like we can do nice timezone selection!
$current_offset = get_option('gmt_offset');
$tzstring = get_option('timezone_string');
if (empty($tzstring)) { // set the Etc zone if no timezone string exists
if ($current_offset < 0) $offnum = ceil($current_offset);
else $offnum = floor($current_offset);
if ($current_offset < 0) $offnum = - ceil($current_offset);
else $offnum = - floor($current_offset);
$tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
}
?>