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? Link to comment https://forums.phpfreaks.com/topic/174347-solved-1-minute/ 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. Link to comment https://forums.phpfreaks.com/topic/174347-solved-1-minute/#findComment-919009 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! Link to comment https://forums.phpfreaks.com/topic/174347-solved-1-minute/#findComment-919014 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.