How to set "date.timezone" option in php.ini

Question : How to change the date.timezone value in PHP?


Open php.ini

sudo vi /etc/php5/apache2/php.ini

and  look  search

; Defines the default timezone used by the date functions.
;date.timezone =

en date  time  zone  make  some thing :

date.timezone = "Europe/Amsterdam"

Now save and close and restart your apache.

/etc/init.d/apache2 restart

Is done !

{loadposition user9}

Related Articles By Tags:

{loadposition user1}

  • http://enteryoursiteURL... manikandan

    Timezone for PHP is not set. Please set "date.timezone" option in php.ini.

  • Said Suleiman

    Where do i put the “/etc/init.d/apache2 restart” ?

  • Lolman

    in cmd

  • Alex

    Thanks. That was helpful. Should be in the documentation!!

  • damianh

    Thanks a lot. A great and useful solution