What time is it?

<!-- Begin snippet: js -->

<!-- language: lang-js -->

    document.getElementsByTagName("div")[0].style.marginTop = $(document).height() / 3 + "px";

    window.setInterval(function () {
        var time = "";
        var now = new Date();
        var hours = "" + now.getHours() + ":";
        var minutes = "" + now.getMinutes() + ":";
        var seconds = "" + now.getSeconds();
        var part;
        if (parseInt(hours) < 12) {
            part = " AM";
        } else {
            hours = parseInt(hours) - 12 + ":";
            part = " PM";
        }
        if (hours.length < 3) {
            hours = "0" + hours;
        }
        if (minutes.length < 3) {
            minutes = "0" + minutes;
        }
        if (seconds.length < 2) {
            seconds = "0" + seconds;
        }
        time += hours;
        time += minutes;
        time += seconds;
        time += part;
        $("#holder").html(time);
    }, 1000);

<!-- language: lang-css -->

    div {
        text-align: center;
        font-size: 100pt;
    }

<!-- language: lang-html -->

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <div id="holder"></div>

<!-- end snippet -->