function updateTime() { let losAngelesElement = document.querySelector("#los-angeles"); let losAngelesDateElement = losAngelesElement.querySelector(".date"); let losAngelesTimeElement = losAngelesElement.querySelector(".time"); let losAngelesTime = moment().tz("America/Los_Angeles"); losAngelesDateElement.innerHTML = losAngelesTime.format("MMMM Do YYYY"); losAngelesTimeElement.innerHTML = losAngelesTime.format( "h:mm:ss []A[]" ); let parisElement = document.querySelector("#paris"); let parisDateElement = parisElement.querySelector(".date"); let parisTimeElement = parisElement.querySelector(".time"); let parisTime = moment().tz("Europe/Paris"); parisDateElement.innerHTML = parisTime.format("MMMM Do YYYY"); parisTimeElement.innerHTML = parisTime.format("h:mm:ss []A[]"); } function updateCity(event) { let cityTimeZone = event.target.value; if (cityTimeZone === "current") { cityTimeZone = moment.tz.guess(); } let cityTime = moment().tz(cityTimeZone); let citiesElement = document.querySelector("#cities"); citiesElement.innerHTML = `