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
Comments:
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=5862e3bd-f6f6-479a-a561-450fb8727e4a)