Hello Everyone,
I am looking to add a timestamp to messages such as the attached. I spoke to FortiSupport and they said there isn't a variable I can call for the information and suggested using JavaScript.
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 -
<p id="timeStamp">
</p>
<script>
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;
</script>
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.
What do I need to do to get the JavaScript to display in the 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.
User | Count |
---|---|
1923 | |
1144 | |
769 | |
447 | |
277 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.