I'm auto generating tasks via logic hook., I need to set the due date the next day 6pm CST.
I tried the below code, but it is setting only the 'date' part for due date, 'time' part is always set to 12:00
Please advicePHP Code:$today = date("Y-m-d H:i:s", strtotime("now"));
$tomorrow = date("Y-m-d H:i:s", strtotime("Tomorrow 6pm"));
$task->date_start = $TimeDate->to_display_date_time($today);
$task->date_due = $TimeDate->to_display_date_time($tomorrow);
var_dump of variables after above statements are
Code:$today string(19) "2009-11-05 09:06:25" $tomorrow string(19) "2009-11-06 18:00:00" $task->date_start string(16) "11/05/2009 03:06" $task->date_due string(16) "11/06/2009 12:00"


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks