in reply to calculating 24 hours ago with localtime
As I probably already said in the other thread, most people just use a number field and insert a time() value. This makes (relative) time-based calculations so much easier, since you can just add or subtract from time() or NOW() and give mySQL a nice efficient numeric comparison to do.