in reply to Date function
localtime( time() - (24 * 60 * 60) ); [download]
A reasonable approach, though if you live somewhere that observes daylight savings, it will produce incorrect results for one hour, twice each year.