[wp-trac] [WordPress Trac] #9588: time() is not GMT time()
WordPress Trac
wp-trac at lists.automattic.com
Wed Dec 2 22:30:13 UTC 2009
#9588: time() is not GMT time()
--------------------------------+-------------------------------------------
Reporter: Denis-de-Bernardy | Type: defect (bug)
Status: closed | Priority: normal
Milestone: 2.9 | Component: Date/Time
Version: 2.8 | Severity: normal
Resolution: fixed | Keywords: has-patch needs-testing
--------------------------------+-------------------------------------------
Comment(by Denis-de-Bernardy):
Replying to [comment:25 Otto42]:
> If you're setting the default to UTC early on, then resetting it later
(for that 23/24ths of the world not in GMT time), then time() will give
one answer at one point and a different answer later in the process. If
anywhere you happen to compare the values from before and after that
point, you're going to get weird results.
>
> This can still cause problems on PHP5 setups. Those instances using
time() need to be examined to see if they should be using gmtime()
instead.
It's quite early on:
http://core.trac.wordpress.org/browser/trunk/wp-settings.php?rev=12315#L18
one gets warnings if it's placed anywhere later. I do so your point,
though. e.g. #9586...
FWIW, I've been Ryan's two lines in the wp-config.php files of each of my
sites for longer than I can remember. I also added it to my WP Fixes
plugin, so that my customers can use it on their end. It *fixed* #9586 as
a side effect, and I've yet to see reports of fishy sounding odd
behaviors.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/9588#comment:26>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list