Fixed the missing blogs issue!

Posted Monday February 12th 2007 from 51.5167, -0.1120

I noticed at the weekend that some of my archive blog posts have been going missing - they were still in the database, but the site was reporting them as post not found.

It turns out that becuase the server time was set to UTC, when using PHP's strtotime function to create a timestamp that crossed a BST boundary, it would not take the hour difference into account (meaning the timestamp was exactly 3600 seconds out). I've managed to rectify this by using the date_default_timezone_set function, passing it the string 'Europe/London' and everything seems to be retrieved fine now.

Tagged and .