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