soycharliente Posted July 9, 2007 Share Posted July 9, 2007 Why is this not working? <?php $time = mktime() + (4*3600); ?> I'm trying to add 3 hours to the time that mktime() returns. I just stays at the time the mktime() returns. Nothing gets added. Link to comment https://forums.phpfreaks.com/topic/59144-solved-adding-time-to-mktime/ Share on other sites More sharing options...
Carterhost Posted July 9, 2007 Share Posted July 9, 2007 Try: <?php $time = time() + (4*3600); ?> This adds 4 hours to the current time. To add 4 hours to the time you specify in mktime(): <?php $time = mktime($hour+4, $minute, $second, $month, $day, $year); ?> Link to comment https://forums.phpfreaks.com/topic/59144-solved-adding-time-to-mktime/#findComment-293713 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.