function getDatetime(dateStr) {
  var dt = new Date(dateStr);
  return new Date(dt.getTime() - dt.getTimezoneOffset() * -60000);
}
Formats date string to datetime
@param {string} dateString - Date string to convert.
@returns {object} Formatted datetime