From the server I get a datetime variable in this format: 6/29/2011 4:52:48 PM and it is in UTC time. I want to convert it to the current user’s browser time us
6/29/2011 4:52:48 PM
This works for me:
function convertUTCDateToLocalDate(date) { var newDate = new Date(date.getTime() - date.getTimezoneOffset()*60*1000); return newDate; }