Hi there!
I'm hoping someone could help me with a small time calculation problem I have please.
My problem is that I want to add hours onto a time. eg, find the time in 'x' hours.
I currently grap the time using:
$today_datetime = date("Y-m-d H:i:s");
I then split this into individual segments so that the seconds can be calculated:
list ($year, $month, $day, $hour, $min, $sec) = split ('[- :]', $today_datetime);
And then use 'mktime' to calculate the Epoch time:
$today_date = mktime ($hour, $min, $sec, $month, $day, $year);
The problem now is how do I add 4 hours for example onto the current date, so that the time +4 is displayed?
eg, 13:20:00 +4 hours to display = 17:20:00
Thanks for your help!!!!
Paul