"24 hours ago" in Unix |
[eluser]ShoeLace1291[/eluser]
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. Code: $one_day_ago = time() - (60 * 60 * 24);
[eluser]danmontgomery[/eluser]
Or, for the lazy: Code: $yesterday = strtotime("24 hours ago"); http://php.net/manual/en/function.strtotime.php
|
Welcome Guest, Not a member yet? Register Sign In |