Setting your default timezone in PHP is a very easy task and may be needed for some applications. If you fall into this bucket, all you need to do is….
- Open up your default php.ini file (or the one you wish to edit). I can help you find your default php.ini file, if you don’t know where it is.
- Find the line that says ;date.timezone
- Uncomment that line by removing the semi-colon, then set it equal to the appropriate timezone. For instance:
- date.timezone = America/New_York
- Save the file and restart Apache
In case you’re wondering… I write these how to’s to help me remember. Might not be so helpful for everyone else, but maybe.