I'm trying to create a counter that shows how much time you've spent on the site and I use sessionStorage to access the Date object from multiple pages.

The problem is that the counter starts at 01:00:00 even though I initialized the Date with 00:00:00.

Here is my code:

```
function checkTime(){
    if(document.getElementById("clock")[13] == ''){
        var d = new Date('2010-06-11T00:00:00');
        sessionStorage.setItem('time', d);
    }
}

function updateTime(){
    checkTime();
    var nDate = new Date(sessionStorage.getItem('time'));
    nDate.setSeconds(nDate.getSeconds() + 1);
    sessionStorage.setItem('time', nDate);
    var hours = (nDate.getHours()<10 ? "0" : "") + nDate.getHours();
    var minutes = (nDate.getMinutes()<10 ? "0" : "") + nDate.getMinutes();
    var seconds = (nDate.getSeconds()<10 ? "0" : "") + nDate.getSeconds();
    var timeString = hours + ":" + minutes + ":" + seconds;
    document.getElementById("clock").innerText = timeString;

}
setInterval(updateTime, 1000);

```