[wp-trac] Re: [WordPress Trac] #8662: current_time('timestamp')
doesn't return the correct timestamp value
WordPress Trac
wp-trac at lists.automattic.com
Tue Apr 28 21:18:48 GMT 2009
#8662: current_time('timestamp') doesn't return the correct timestamp value
--------------------------+-------------------------------------------------
Reporter: hudatoriq | Owner: hudatoriq
Type: defect (bug) | Status: new
Priority: high | Milestone: 2.9
Component: Date/Time | Version: 2.7
Severity: major | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by Otto42):
Note that here: http://core.trac.wordpress.org/browser/trunk/wp-
includes/functions.php?rev=10753#L3063
If you're using the new timezone functionality, it's calling
date_default_timezone_set(). This should be forcing the time() function to
return the local timezone, not the GMT time. This is new functionality,
added by the new timezone support in [10753].
If it is not desirable for time() to return blog local time, then line
3063 there needs to be removed. This won't affect the timezone additions.
This could be the cause of several different time related issues. Try
commenting that line out, see if the time problems go away. Because before
that was added, WordPress never set the default timezone in PHP.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/8662#comment:25>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list