Results 1 to 5 of 5
Thread: PHP Time Manipulation
May 28, 2010, 01:34 #1
- Join Date
- Aug 2009
- 0 Post(s)
- 0 Thread(s)
PHP Time Manipulation
I have a MySQL (Y-m-d H:i:s) starting date. . .
I then have a task duration in seconds/minutes
What I'm after is a task 'due' date, which falls between normal working hours (09:00 - 17:30).
$task_start = 2010-05-27 16:08:23;
$duration = 45000; // Which I guess is 12.5 hours????
$start_str = strtotime($task_start);
$calc = $start_str + $duration;
$due_date = date('Y-m-d H:i:s', $calc);
echo $due_date; // 2010-05-28 04:38:23
Any help would be awesome!