[Snippet] Setting the timezone for PHP 5.3
Posted on January 25, 2012
PHP 5.3 requires a time zone to be set if you do any kind of date processing.
Simply set this in your php.ini
Or if you are on a shared host, you can do it in a .htaccess
If all else fails, put the following in your code
Related posts
- [Snippet] Formatting the date in twitter XML feed
The date in the Twitter XML feed is daft and ugly! It reads [created_at] =>... - [Snippet] Simplified UK/US Date Conversion
One of my major annoyances in PHP & MySQL world is the different formats when... - [Snippet] Allow PHP in Smarty (CubeCart 5)
Although it is generally bad practise to put PHP code directly into your (CubeCart 5)... - Looping over dates in PHP
I recently had to loop over the difference between two dates. For example to create... - [Snippet] Formatting a currency string
The Shopp ecommerce plugin for WordPress has a little annoying "feature" that returns the product...


