What I do is set the timezone in the .htaccess file, to avoid having to do adjustments in scripts.
First, use the the “tzselect” command to find out your timezone. (You could also use “EST5EDT”, “UTC”, etc.)
To change the timezone for Apache (and PHP), add this to the .htaccess file in your web site’s root directory:
SetEnv TZ America/Montreal
Unfortunately, this does not affect MySQL… yet. MySQL 4.1 will let you change the time zone using “SET time_zone = ‘America/Montreal’”
To change the timezone used for interactive shells, put this in .bashrc: (varies if you’re using a different shell)