Hot!How to get a timestamp in FortiGate Webfilter Block pages

New Member
  • Total Posts : 1
  • Scores: 0
  • Reward points: 0
  • Joined: 2016/09/20 18:05:25
  • Status: offline
2020/10/23 17:45:23 (permalink)

How to get a timestamp in FortiGate Webfilter Block pages

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">
  var tzoffset = (new Date()).getTimezoneOffset() * 60000;
  //offset in milliseconds
  var localISOTime = (new Date( - 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  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.

Attached Image(s)


0 Replies Related Threads

    Jump to:
    © 2020 APG vNext Commercial Version 5.5