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:
parent
eaa749e545
commit
7f9bf59265
|
@ -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