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

git-svn-id: https://develop.svn.wordpress.org/trunk@10962 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-16 22:17:13 +00:00
parent eaa749e545
commit 7f9bf59265
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;
}
?>