doddsey_65 Posted February 2, 2011 Share Posted February 2, 2011 when i use strtotime('+3 HOURS') everything is fine. so why cant i use strtotime('+3.5 HOURS')? what would be the proper way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/226410-strtotime/ Share on other sites More sharing options...
requinix Posted February 2, 2011 Share Posted February 2, 2011 3.5 hours = 3 hours 30 minutes, yes? Quote Link to comment https://forums.phpfreaks.com/topic/226410-strtotime/#findComment-1168638 Share on other sites More sharing options...
doddsey_65 Posted February 2, 2011 Author Share Posted February 2, 2011 correct Quote Link to comment https://forums.phpfreaks.com/topic/226410-strtotime/#findComment-1168639 Share on other sites More sharing options...
jcbones Posted February 2, 2011 Share Posted February 2, 2011 Did that fix it? Quote Link to comment https://forums.phpfreaks.com/topic/226410-strtotime/#findComment-1168678 Share on other sites More sharing options...
salathe Posted February 2, 2011 Share Posted February 2, 2011 Those relative formats [1] only accept integer numbers, if you want to use a fractional part of a unit then you must instead use a whole number of smaller units. As requinix said, use hours and minutes. [1] http://php.net/datetime.formats.relative Quote Link to comment https://forums.phpfreaks.com/topic/226410-strtotime/#findComment-1168752 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.