How to get a timestamp in FortiGate Webfilter Block pages
The message I am trying to add the timestamp to is at System > Replacment Messages > Extended View > URL Filter Error Messages.
The code I have used is -
var tzoffset = (new Date()).getTimezoneOffset() * 60000;
//offset in milliseconds
var localISOTime = (new Date(Date.now() - tzoffset)).toISOString().slice(0, -5);
var repl01=localISOTime.replace("T", " ");
document.getElementById("timeStamp").innerHTML = repl01;
The code works locally and when pasted into the 'Try It Yourself' links on w3schools.com. However, nothing is displayed in the Fortiguard Web Page Blocked message.
Also, I am really trying to get the timestamp to display in the ISO format because it is literally a copy and past into the 'Device Time' filter when browsing logs.
Thanks for any information.