How to show local time?

By James J

Display local time using javascript...

<script type="text/javascript">
    
function ShowTime()
    {
         var
Time = new Date();

        var hours =
Time .getHours();
        var minutes =
Time .getMinutes();
        var seconds =
Time .getSeconds();    
        var localTime= hours + " : " + minutes + " : " + seconds;
    }
</script>

How to show local time?  (776 Views)