ballhogjoni Posted January 12, 2009 Share Posted January 12, 2009 I don't know if that made sense, but I want to get the exact time by using time() but for last year. example: time will give me something like jan 12, 2009 12:34:08 but in unix timestamp. I want the exact time except for the year in unix timestamp. Any ideas? This has too include leap year to. Link to comment https://forums.phpfreaks.com/topic/140556-solved-get-the-exact-time-in-unix-time-as-now-but-last-year/ Share on other sites More sharing options...
rhodesa Posted January 12, 2009 Share Posted January 12, 2009 $last_year = strtotime("-1 year"); //or $last_year = mktime(date('H'),date('i'),date('s'),date('m'),date('d'),date('Y')-1); Link to comment https://forums.phpfreaks.com/topic/140556-solved-get-the-exact-time-in-unix-time-as-now-but-last-year/#findComment-735534 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.