Make WordPress Core


Ignore:
Timestamp:
04/16/2009 10:17:13 PM (15 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r10878 r10962  
    138138$tzstring = get_option('timezone_string');
    139139if (empty($tzstring)) { // set the Etc zone if no timezone string exists
    140     if ($current_offset < 0) $offnum = ceil($current_offset);
    141     else $offnum = floor($current_offset);
     140    if ($current_offset < 0) $offnum = - ceil($current_offset);
     141    else $offnum = - floor($current_offset);
    142142    $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
    143143}
Note: See TracChangeset for help on using the changeset viewer.