rondog Posted September 15, 2009 Share Posted September 15, 2009 I cannot get +1 Minute to work using strtotime. My code is: <?php $now = time(); echo "now: ".$now."<br/>"; $stamp = date('d F, Y, h:i',$now); $plusMinute = strtotime("$stamp +1 Minute"); echo "one minute from now: ".$plusMinute; ?> It echos something like: now: 1253037001 one minute from now: 1253059800 Every time I refresh the now: var changes, yet the one Minute from now stays at that number I've tried +1 Minute as well as next Minute Any idea what I am doing wrong? Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted September 15, 2009 Share Posted September 15, 2009 Just do $plusMinute = strtotime('+1 minute'); If you specify a relative time only, it'll always be relative to the current time. Quote Link to comment Share on other sites More sharing options...
rondog Posted September 15, 2009 Author Share Posted September 15, 2009 Oh well that makes sense I suppose thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.