FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
wchangjie_FTNT
Article Id 410968
Description This article describes how to validate the FortiGate system time up to milliseconds timestamp.
Scope FortiOS.
Solution

Background:
In events where the timestamp needs to be precise (for example, during packet captures), it is recommended to validate the system time before capture begins. The output of FortiOS CLI execute time will display system time up to seconds format.

Here is an example when a FortiGate is insync with an NTP server:

 

LAB-FGT-01 # diagnose sys ntp status 
synchronized: yes, ntpsync: enabled, server-mode: enabled

ipv4 server(ntp2.fortiguard.com) 208.91.112.62 -- reachable(0xff) S:2 T:162
server-version=4, stratum=2
reference time is ec734b0d.8e67c21f -- UTC Tue Sep 16 02:33:49 2025
clock offset is 0.005415 sec, root delay is 0.141129 sec
root dispersion is 0.010300 sec, peer dispersion is 819 msec
<snip>

LAB-FGT-01 # execute time
current time is: 10:28:33 << Up to second format
last ntp sync:Tue Sep 16 10:16:16 2025


Recommendation:

The fnsysctl command can be used with date parameters to display system time up to milliseconds.

Example of issuing fnsysctl date +"%Y%m%d.%H%M%S.%3M".

 

LAB-FGT-01 # fnsysctl date +"%Y%m%d.%H%M%S.%3M"
"20250916.102504.025" << Translates to Sep 16 2025 10:25:04.025hrs (milliseconds format)

<After 20 minutes later>


LAB-FGT-01 # fnsysctl date +"%Y%m%d.%H%M%S.%3M"

"20250916.104517.045" << Translates to Sep 16 2025 10:45:17.045hrs (milliseconds format)