Hi makenzi.exc,
Use the following methods.
getUTCDate - Returns UTC Date.
getUTCMonth - Returns UTC Month.
getUTCFullYear - Returns UTC Year.
getUTCHours - Returns UTC Hours.
getUTCMinutes - Returns UTC Minutes.
getUTCSeconds - Returns UTC Seconds.
Refer below example.
HTML
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
body { font-family: Arial; font-size: 10pt; }
</style>
</head>
<body>
<input type="button" value="Get UTC Date and Time" onclick="GetUTCDate()" />
<script type="text/javascript">
function GetUTCDate() {
var dt = new Date();
// Get UTC Date
var day = dt.getUTCDate().toString().padStart(2, "0");
// Get UTC Month
var month = dt.getUTCMonth().toString().padStart(2, "0");
// Get UTC Year
var year = dt.getUTCFullYear();
// Get UTC Hours
var hour = dt.getUTCHours().toString().padStart(2, "0");
// Get UTC Minutes
var minutes = dt.getUTCMinutes().toString().padStart(2, "0");
// Get UTC Seconds
var seconds = dt.getUTCSeconds().toString().padStart(2, "0");
var message = "UTC Date is: " + year + "-" + month + "-" + day + "\n";
message += "UTC Time is: " + hour + ":" + minutes + ":" + seconds;
alert(message);
}
</script>
</body>
</html>
Demo
Screenshot

Downloads
Download Sample