Working with dates and times in JS is quite uneasy. If you're as hurried as I am, just copy-paste this to be able to get current time :

var getCurrentTime = function() {
    var d = new Date(),
        t = [d.getHours(), d.getMinutes(), d.getSeconds()],
        i;

    for (i in t) {
        t[i] = '' + parseInt(t[i]);

        while (t[i].length < 2) {
            t[i] = '0' + t[i];
        }
    }

    return t.join(':');
};