#9706 closed defect (bug) (fixed)
fishy looking query on a wp 2.8 front page
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 2.8 | Priority: | low |
| Severity: | minor | Version: | 2.8 |
| Component: | Optimization | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
SELECT option_value FROM wp_options WHERE option_name = 'timezone_string' LIMIT 1
it's no longer around after updating options / general. is it not added in the installer/upgrader?
Attachments (1)
Change History (12)
#4
@
17 years ago
I think it's used in the timezone offset scripts. it would need to be initialized (add_option()) in the installer or upgrader scripts.
#6
@
17 years ago
not 100% certain. server time zone, I think. (should be clear upon visiting settings / general on a clean install)
#7
@
17 years ago
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,.
related files:
/wp-admin/options-general.php
/wp-admin/options.php
/wp-includes/functions.php
this must be added sometime and should be ready to removed then. maybe the reverse of a patch or a chnageset? if it is not needed any longer then it should be removed.