Search code examples
phptimetimestampunix-timestamp

What time corresponds to : time()-24*60*60 ? (PHP)


What time corresponds to

time()-24*60*60 

7 days? is that right?


Solution

  • time 24 hours ago.

    time() returns the current Unix timestamp which is number of seconds since the Unix Epoch. Also there are 24 hours in a day and 60 min in an hour and 60 sec in a min.