Whilst working on a UI update for a client, I noticed the dates associated with all the articles were out by a day. I figured I'd screwed something up during my changes, but to be sure, threw together a little php test file that gave me some odd results. The test file is just;
<?php
$date = 1246053600;
echo 'unix: ',$date,', converted: ',date('d/m/Y', $date);
?>
If I run the above code on my localhost I get:
unix: 1246053600, converted: 26/06/2009
But if I run it on the production server I get:
unix: 1246053600, converted: 27/06/2009
Notice the day difference between the two? What's happening here?! Surely converting a unix timestamp to a date doesn't have any server specific dependancies?