Last active
September 5, 2016 15:35
-
-
Save igotit-anything/d2297c86d6add2958a7af4015f887bd6 to your computer and use it in GitHub Desktop.
JavaScript. get utc time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script language="javascript"> | |
function js_time() | |
{ | |
var today = new Date(); | |
return today.toUTCString(); | |
} | |
</script> | |
// if in asp | |
<% | |
asp_utcTime = "<script>document.write(js_time());</script>" | |
%> | |
<%=asp_utcTime%> | |
//results | |
Mon, 05 Sep 2016 15:30:49 GMT | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment