How to display the UTC in JavaScript?

Posted by Joys of Programming on in JavaScript

The following program will display the current time in UTC. But this program will display it in the default format.


<title>Time in UTC</title>

<script type="text/javascript">
<!--
var time = new Date();
document.write("Time: "+  time );
-->
</script>

The time will be displayed according to your current time zone

Reblog this post [with Zemanta]


Tags: , , , , ,

Comments:

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.