converting utc date from DB to local time


I am converting UTC date coming from DB to local time using

var convertDateFromDB ="%Y-%m-%d %H:%i", true);

Using this gives me an error
date.getUTCFullYear is not a function dhtmlxscheduler_debug.js Line 2515.

is this a known bug or am I going wrong somewhere?

You are using date_to_str - are you sure that you need not use str_to_date instead ?
Server side data most probably was provided as string, and to get data object you need to use str_to_date

Yes i am using str_to_date now but now i am getting the error
date.split is not a function
localhost:2238/js/dhtmlxSchedule ā€¦ r_debug.js
Line 2550

The date from the DB is in the format ā€œuā€ of the standard datetime formats from msdn library.

Can you provide some kind of sample or link to the page where issue occurs?

Above error can occur if you are provide null or undefined value to the conversion function, not quite sure how it can occurs in real app.