/**
 *
 * @param dateObj {Date}
 * @return {Date}
 */
const createUTCDate = (dateObj) => {
    const comps = {
        year: dateObj.getFullYear(),
        month: dateObj.getMonth(),
        day: dateObj.getDate(),
        hours: dateObj.getHours(),
        minutes: dateObj.getMinutes(),
        seconds: dateObj.getSeconds()
    };
    return new Date(Date.UTC(comps.year, comps.month, comps.day, 0, 0, 0));
}

export default createUTCDate;