When creating a task due_at time has an extra hour added

Hi, I seem to be experiencing an extra hour being added to the due_at field when I attempt to create a task via the Asana API.

The snippet of PHP code I use to send the date and time through is as follows:-

$asanaData_DevelopmentTask["due_at"] = date("Y-m-d\TH:i:s\Z", strtotime( $this->request->data['form_task_development_due_date'] . " " . $this->request->data['form_task_development_due_time'] ));

Like I say the task get created fine and the due at date and time get set correctly, only that the ‘time’ portion has an extra hour added e.g. I set 10:30 for the time, but Asana reports it as 11:30.

Any tips here would be most appreciated.


For me that would be a timezone / time on the server issue. You are using the date method from PHP, so that will send the date of your server. Are you sure it has the date you expect?

Hi Bastien, thanks for your reply. Yes that too did cross my mind so I’ve tried a few things such as setting this function before I attempt to use the date function:-


Also I’m logging the output of ‘date’ so I can see what’s being produced and sent to Asana, in this case following the same example, I get:-


The actual due date in Asana gets set correctly, its just the ‘time’ portion that has 1 hour added to it…


So you are saying that when you send 10.30 to Asana they actually record 11.30 on the task?

Hi Bastien, yes exactly that, or at least that’s what I can see happening.


cc @Joe_Trollo maybe you have an idea?