How to use UTC in Javascript

In this article I am going to explain about UTC() method in Javascript.
  • 1685

JavaScript UTC() Method

UTC stand for Universal Coordinated Time. JavaScript UTC() method use for find number of millisecond between defined Date and midnight 1 January 1970 according to universals time.






    <script type="text/javascript">

        function myfun() {

            var dd = Date.UTC(2012, 08, 07);

            var mm = document.getElementById("tst");

            mm.innerHTML = dd;






        click button to find milisecond between specefied date and 1 january 1970</p>

    <h3 id="tst" style="color: Red">


    <button onclick="myfun()">

        click me</button>








You may also want to read these related articles: here
Ask Your Question 
Got a programming related question? You may want to post your question here


More Articles

© 2020 DotNetHeaven. All rights reserved.