jakebur01 Posted August 12, 2008 Share Posted August 12, 2008 I am trying to add one hour onto $Endtime. I can't get it to work correctly. $Starttime = mktime($Hour, 0, 0, $Month, $Day, $Year); $Endtime = mktime($Hour+1, 0, 0, $Month, $Day, $Year); Link to comment https://forums.phpfreaks.com/topic/119358-solved-adding-1-hour-onto-timestamp/ Share on other sites More sharing options...
DarkWater Posted August 12, 2008 Share Posted August 12, 2008 $starttime = mktime($Hour, 0, 0, $Month, $Day, $Year); $endtime = $starttime + (60 * 60); There you go. Link to comment https://forums.phpfreaks.com/topic/119358-solved-adding-1-hour-onto-timestamp/#findComment-614841 Share on other sites More sharing options...
jakebur01 Posted August 12, 2008 Author Share Posted August 12, 2008 Will this work just the same? $Endhour=$Hour+1; $Starttime = mktime($Hour, 0, 0, $Month, $Day, $Year); $Endtime = mktime($Endhour, 0, 0, $Month, $Day, $Year); Thanks, Jake Link to comment https://forums.phpfreaks.com/topic/119358-solved-adding-1-hour-onto-timestamp/#findComment-614849 Share on other sites More sharing options...
DarkWater Posted August 12, 2008 Share Posted August 12, 2008 I like mine better. Try it. >_< Link to comment https://forums.phpfreaks.com/topic/119358-solved-adding-1-hour-onto-timestamp/#findComment-614852 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.