Get the timestamp of exactly one week ago in PHP?

Posted by Mike Crittenden on Stack Overflow See other posts from Stack Overflow or by Mike Crittenden
Published on 2010-03-24T12:44:27Z Indexed on 2010/03/24 12:53 UTC
Read the original article Hit count: 321

Filed under:
|
|

I need to calculate the timestamp of exactly 7 days ago using PHP, so if it's currently March 25th at 7:30pm, it would return the timestamp for March 18th at 7:30pm.

Should I just subtract 604800 seconds from the current timestamp, or is there a better method?

© Stack Overflow or respective owner

Related posts about php

Related posts about datetime