﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
11672	current_time() does not correctly retrun localized time	hiromasa	nbachiyski	"When you set you set timezone using a city name, current_time() function in functions.php does not return correct local time.

==== Cause: ====

When you get gmt_offset(), the wp_timezone_override_offset() hook offsets the timezone again after date_default_timezone_set sets the timezone (this happens only when timezone_string exists).

==== Example 1: ====

Your timezone is set to ""Tokyo"" (UTC+9), using the city name. wp_options will contain:
{{{
timezone_string	Asia/Tokyo
gmt_offset      ''
}}}
Code below will incorrectly retun UTC+9+9.
{{{
#!php
<?php echo date('Y-m-d H:i:s', current_time( 'timestamp' )); ?>
}}}
==== Example 2: ====
Your timezone is set to ""UTC+9"" (WordPress 2.9.1 RC1). wp_options will contain:

{{{
timezone_string	''
gmt_offset      9
}}}
Code below will correctly retun UTC+9.
{{{
#!php
<?php echo date('Y-m-d H:i:s', current_time( 'timestamp' )); ?>
 }}}"	defect (bug)	closed	normal	3.0	Date/Time	2.9	normal	fixed		info@…
