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:
parent
58aec06ad9
commit
0f43de45c5
|
@ -137,8 +137,8 @@ else: // looks like we can do nice timezone selection!
|
||||||
$current_offset = get_option('gmt_offset');
|
$current_offset = get_option('gmt_offset');
|
||||||
$tzstring = get_option('timezone_string');
|
$tzstring = get_option('timezone_string');
|
||||||
if (empty($tzstring)) { // set the Etc zone if no timezone string exists
|
if (empty($tzstring)) { // set the Etc zone if no timezone string exists
|
||||||
if ($current_offset < 0) $offnum = ceil($current_offset);
|
if ($current_offset < 0) $offnum = - ceil($current_offset);
|
||||||
else $offnum = floor($current_offset);
|
else $offnum = - floor($current_offset);
|
||||||
$tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
|
$tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue