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>
  • Previous Analysis of common functions of Python string and file operations
  • Next C # method to read files using file stream
  • Trends