Feeds:
RSS
Atom

I moved one of our old projects to new server. It runs PHP 5.2.x. There is a forum there and I found that date() PHP function randomly returns UTC time instead of local time. Searching Internet did not give any results. Next I found that date/time support changed in PHP since 5.1.x and now it is essential to set "date.timezone" directive correctly in php.ini. I did that and hope it will force date() to return proper time...

Like it? Then bookmark it! digg.comdel.icio.usgoogle.comMyLink.deYahooMyWebTechnoratiFurllive.comnetscapeTagThatWebnews

2 Comments

  1. on Tuesday, 01-04-08 20:02 Jeroen
    Might be a good idea to turn on error reporting for E_STRICT then ;-)
  2. on Thursday, 03-04-08 13:55 Fabrizio Branca
    Hi Dmitry,

    have you tried the new DateTime object in PHP5.2?

    Here is a good tutorial:
    http://laughingmeme.org/2007/02/27/looking-at-php5s-datetime-and-datetimezone/

    Greetin[..] from Laax :)

    Fabrizio

Leave a Reply