Javascript date and time will be in local timezone.
If you want to display the time just like mysql time, then you will have to convert the localtime to server timezone in javascript.
You can you date.getTimezoneOffset(), to get the offset between local time and utc, and then use this to convert locatime to utc+9:30
Edit
how to convert JQuery NOW() date time data to mysql datetime format in
PHP.
Final answer should be date and time in mysql datetime format and that
should be in javascript var veritable or PHP veritable.
Example to convert locatime to different timezone ( UTC + 9:30 )
var localDate = $.now();
localDate = new Date(localDate);
console.log("local datetime is ", printMysqlFormat(localDate));
var offset = localDate.getTimezoneOffset();
var offsetMilliseconds = offset * 60 * 1000;
var serverMilliseconds = localDate.getTime() + offsetMilliseconds + (570 * 60 * 1000)
var serverdate = new Date(serverMilliseconds);
console.log("localtime in server timezone is", printMysqlFormat(serverdate));
function printMysqlFormat(d) {
var day = d.getDate() + "";
var month = (d.getMonth() + 1) + "";
var year = d.getFullYear() + "";
var hour = d.getHours() + "";
var minutes = d.getMinutes() + "";
var seconds = d.getSeconds() + "";
day = day.length == 1 ? "0" + day : day;
month = month.length == 1 ? "0" + month : month;
hour = hour.length == 1 ? "0" + hour : hour;
minutes = minutes.length == 1 ? "0" + minutes : minutes;
seconds = seconds.length == 1 ? "0" + seconds : seconds;
return day + "-" + month + "-" + year + " " + hour + ":" + minutes + ":" + seconds;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
$.now()to server timezone