[wp-trac] Re: [WordPress Trac] #9706: fishy looking query on a wp 2.8 front page

WordPress Trac wp-trac at lists.automattic.com
Thu May 7 10:03:34 GMT 2009


#9706: fishy looking query on a wp 2.8 front page
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  anonymous  
     Type:  defect (bug)       |      Status:  new        
 Priority:  low                |   Milestone:  2.8        
Component:  Optimization       |     Version:  2.8        
 Severity:  minor              |    Keywords:  needs-patch
-------------------------------+--------------------------------------------

Comment(by hakre):

 it (''timezone_string'') is just not set on install. It can be set on the
 options page (general), currently there is the timezone select element (
 ''wp_timezone_choice()'' ) that will set this option.

 default would be null, false or an empty string. that is at if it would
 not be in the db.

 and while that being empty:
 {{{
 $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);
         $tzstring = 'Etc/GMT' . (($offnum >= 0) ? '+' : '') . $offnum;
 }
 }}}

 ''gmt_offset'' is set automatically on install while populating the
 options ( ''populate_options()'' ). this is the important line (~238):
 {{{'gmt_offset' => date('Z') / 3600,}}}.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9706#comment:7>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list