Home>
Here use javascript to convert the current time to UTC standard time,Beijing is in Dongba District,8 hours minus Beijing time
<! Doctype html>
<html>
<body>
<p>
click the button to display the utc date and time as a string.
</p>
<button onclick="myfunction ()">try it</button>
<script>
function myfunction ()
{
var d=new date ();
var x=document.getelementbyid ("demo");
x.innerhtml=d.toutcstring ();
}
</script>
</body>
</html>
Related articles
- JS method to get and display the current time in real time
- js get current time displayed on the page and refresh every second
- Javascript get current time function and time operation summary
- js method to get the current time is the week of this month
- Javascript method to get the current time of the system
- Example of JS method to get current time
Trends