Skip to content

How to change the time zone within a php script

How to change the time zone within a php script

You can change the time zone within a php script. Here is a sample code:

putenv("TZ=Europe/Amsterdam");
?>

You can set the timezone in .htaccess as well. Add the line:

SetEnv TZ America/Indianapolis

List of timezones is here: http://us.php.net/manual/en/timezones.php

Post a Comment

You must be logged in to post a comment.