"24 hours ago" in Unix

I need to be able to get what the date and time would have been 24 hours from the current time displayed in a unix. How do I do this in code igniter?

[eluser]Colin Williams[/eluser]
Just a little 3rd grade math.

$one_day_ago = time() - (60 * 60 * 24);

Or, for the lazy:

$yesterday = strtotime("24 hours ago");


[eluser]Colin Williams[/eluser]
strtotime('-1d') might work too.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.