var ajax = new GlideAjax('ClientDateTimeUtils');
ajax.addParam('sysparm_name','getNowTime');
ajax.getXMLAnswer(doSomething);
function doSomething(answer){
alert(answer);
}
Return current time in client script ServiceNow
admin Changed status to publish December 26, 2023