mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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;
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user