JSFiddle - React, Tailwind, and code Playground
JavaScript
//Thu, Feb 16, 3:44pm
//set up long term use
var date = new Date();
var options = {
weekday: "short", year: "numeric", month: "short",
day: "numeric", hour: "2-digit", minute: "2-digit"
};
updateTime();
setInterval(function() {
updateTime();
}, 1000); //since dispay is to the minute, could dial this back to every 10 seconds easily.
function updateTime()
{
//do as little work here as possible.
document.getElementById('time').innerHTML = date.toLocaleTimeString("en-us", options);
}