I have a DatePicker in UI5 application. My server is in Australia. When I create any record in IST time, it is working fine. But when a user tries to create any record in Au
prepareDatesToDisplay: function(oDate){ //to display dates from backend
var oTempDate = new Date(oDate);
oDate = new Date(oTempDate.getTime() + oTempDate.getTimezoneOffset() * (60000));
return oDate;
},
changeDateToUTC: function(oDate){ //for sending dates to backend
var oTempDate = new Date(oDate.setHours("00","00","00","00"));
oDate = new Date(oTempDate.getTime() + oTempDate.getTimezoneOffset() * (-60000));
return oDate;
},