[wp-trac] [WordPress Trac] #10940: Default timezone should be set for PHP5 (was: date() and strtotime() warnings in PHP 5.3)

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 11 04:07:01 UTC 2009


#10940: Default timezone should be set for PHP5
--------------------------+-------------------------------------------------
 Reporter:  Viper007Bond  |        Owner:            
     Type:  enhancement   |       Status:  closed    
 Priority:  lowest        |    Milestone:  Unassigned
Component:  Date/Time     |      Version:            
 Severity:  trivial       |   Resolution:  invalid   
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by jacobsantos):

  * status:  new => closed
  * severity:  normal => trivial
  * type:  defect (bug) => enhancement
  * component:  General => Date/Time
  * priority:  normal => lowest
  * version:  2.9 =>
  * milestone:  2.9 => Unassigned
  * resolution:  => invalid


Comment:

 Closing as invalid for the following reasons:

  1. Which timezone do you prefer we set the timezone to? The problem is
 that quite a few time calls are made before the DB is loaded the timezone
 can be pulled. I do believe it is called and set later, but it is far to
 late for most of those errors.
  1. There are quite a few ways of setting this value. Not only in php.ini,
 but also in other places, check php.net for more.
  1. This should really, really be set in your php.ini file. If you are
 using shared hosting then ask your host to set it to where the timezone
 the server is hosted. This won't exactly help you, since many hosting
 won't be in the same timezone as you, but it will remove the error and the
 correct timezone will be set when WordPress starts to use the time
 calculations.
  1. '''This is a server/PHP issue, not a !WordPress one.''' While it could
 be fixed, it will be an enhancement (nothing is technically broken, as it
 works for me, but only because I set the php.ini value and have the
 ability to do so).
  1. The workaround is to use the function and set it in your wp-
 config.php.

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


More information about the wp-trac mailing list