Current UTC and Julian time

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<input type="text" id="idTime" title="curent_time" />
<input type="text" id="idJulian" title="curent_julian" />

JavaScript

function computeJulianDate(DD,MM,YY,HR,MN,SC) {
    with (Math) {
      HR = HR + (MN / 60) + (SC/3600);
      GGG = 1;
      if (YY <= 1585) GGG = 0;
      JD = -1 * floor(7 * (floor((MM + 9) / 12) + YY) / 4);
      S = 1;
      if ((MM - 9)<0) S=-1;
      A = abs(MM - 9);
      J1 = floor(YY + S * floor(A / 7));
      J1 = -1 * floor((floor(J1 / 100) + 1) * 3 / 4);
      JD = JD + floor(275 * MM / 9) + DD + (GGG * J1);
      JD = JD + 1721027 + 2 * GGG + 367 * YY - 0.5;
      JD = JD + (HR / 24);
    }
    return JD;
}
function getUTCDateTimeOrJD(now,jd=0) {
	var hours = now.getUTCHours();
	var minutes = now.getUTCMinutes();
	var seconds = now.getUTCSeconds()
	var month = now.getUTCMonth() + 1;
	var day = now.getUTCDate();
	var year = now.getUTCFullYear();
	if (jd==1)
		return computeJulianDate(month, day, year, hours, minutes, seconds);
    else
   		return day+". "+month+". "+year+". "+hours+":"+minutes+":"+seconds;
}

$(document).ready(function() {
var unixTime = 1535598515;
    	$("#idTime").val(getUTCDateTimeOrJD(new Date(unixTime*1000)));
    	$("#idJulian").val(getUTCDateTimeOrJD(new Date(unixTime*1000),1));
});