You are here:Home»KB»Programming»PHP»Setting the timezone with PHP
Sunday, 06 May 2012 00:00

Setting the timezone with PHP

Written by

because webservers can be located anywhere in the world yet be used predominately in one region you need to be able to cahnge the timezone on the webserver, however the time stamp never changes.


You can set a default time zone for your server from the configuration file (php.ini) at the line:

Timezones are available here http://www.php.net/manual/en/timezones.europe.php

http://php.net/date.timezone

[Date]
; Defines the default timezone used by the date functions
date.timezone = America/New_York

Read 666 times Last modified on Wednesday, 12 November 2014 23:12