Fortinet black logo

Cookbook

Setting the system time

Copy Link
Copy Doc ID 4e2e9371-e0d6-11ea-96b9-00505692583a:512210
Download PDF

Setting the system time

You can either manually set the FortiOS system time, or configure the device to automatically keep its system time correct by synchronizing with a Network Time Protocol (NTP) server.

Daylight savings time is enabled by default, and can only be configured in the CLI.

Note

For many features to work, including scheduling, logging, and SSL-dependent features, the FortiOS system time must be accurate.

To configure the date and time in the GUI:
  1. Go to System > Settings.
  2. In the System Time section, configure the following settings to either manually set the time or use an NTP server:

    Time Zone

    Select a time zone from the list. This should be the time zone that the FortiGate is in.

    Set Time

    Select to either Synchronize with an NTP Server, or use Manual settings.

    Synchronize with an NTP Server

    To use an NTP server other than FortiGuard, the CLI must be used.

    In the Sync interval field, enter how often, in minutes, that the device synchronizes its time with the NTP server.

    Manual settings

    Manually enter the Date, Hour (in 24-hour format), Minute, and Second in their fields.

    Setup device as local NTP server

    Enable to configure the FortiGate as a local NTP server.

    In the Listen on Interfaces field, set the interface or interfaces that the FortiGate will listen for NTP requests on.

  3. Click Apply.
To configure the date and time in the CLI:
  1. Configure the timezone and daylight savings time:
    config system global
        set timezone <integer>
        set dst {enable | disable}
    end
  2. Either manually configure the date and time, or configure an NTP server:

    Manual:

    execute date <yyyy-mm-dd>
    execute time <hh:mm:ss>

    NTP server:

    config system ntp
        set ntpsync enable
        set type {fortiguard | custom}
        set syncinterval <integer>
        set source-ip <ip_address>
        set source-ip6 <ip6_address>   
        set server-mode {enable | disable}
        set interface <interface> 
        set authentication {enable | disable}
        set key-type {MD5 | SHA1}
        set key <password>
        set key-id <integer>
        config ntpserver
            edit <server_id>
                set server <ip_address or hostname>
                set ntpv3 {enable | disable}
                set authentication {enable | disable}
                set key <password>
                set key-id <integer>
            next
        end
    end

Setting the system time

You can either manually set the FortiOS system time, or configure the device to automatically keep its system time correct by synchronizing with a Network Time Protocol (NTP) server.

Daylight savings time is enabled by default, and can only be configured in the CLI.

Note

For many features to work, including scheduling, logging, and SSL-dependent features, the FortiOS system time must be accurate.

To configure the date and time in the GUI:
  1. Go to System > Settings.
  2. In the System Time section, configure the following settings to either manually set the time or use an NTP server:

    Time Zone

    Select a time zone from the list. This should be the time zone that the FortiGate is in.

    Set Time

    Select to either Synchronize with an NTP Server, or use Manual settings.

    Synchronize with an NTP Server

    To use an NTP server other than FortiGuard, the CLI must be used.

    In the Sync interval field, enter how often, in minutes, that the device synchronizes its time with the NTP server.

    Manual settings

    Manually enter the Date, Hour (in 24-hour format), Minute, and Second in their fields.

    Setup device as local NTP server

    Enable to configure the FortiGate as a local NTP server.

    In the Listen on Interfaces field, set the interface or interfaces that the FortiGate will listen for NTP requests on.

  3. Click Apply.
To configure the date and time in the CLI:
  1. Configure the timezone and daylight savings time:
    config system global
        set timezone <integer>
        set dst {enable | disable}
    end
  2. Either manually configure the date and time, or configure an NTP server:

    Manual:

    execute date <yyyy-mm-dd>
    execute time <hh:mm:ss>

    NTP server:

    config system ntp
        set ntpsync enable
        set type {fortiguard | custom}
        set syncinterval <integer>
        set source-ip <ip_address>
        set source-ip6 <ip6_address>   
        set server-mode {enable | disable}
        set interface <interface> 
        set authentication {enable | disable}
        set key-type {MD5 | SHA1}
        set key <password>
        set key-id <integer>
        config ntpserver
            edit <server_id>
                set server <ip_address or hostname>
                set ntpv3 {enable | disable}
                set authentication {enable | disable}
                set key <password>
                set key-id <integer>
            next
        end
    end