in reply to help with time stamp

This would be a lot easier if you were using MySQL and could delegate the date logic to it. merlyn has an article in the March, 2001 Web Techniques that does exactly (well, approximately) that. Unfortunately, the article isn't up on his personal site yet.

Update: The article is up on the Web Techniques site.

Update 2: Hey, you already asked part of this question, and got a few answers that still apply. Go re-read A Time Stamp problem, and look at my earlier answer suggesting that you use a flatfile.