Fortinet black logo

CLI Reference

time

time

Use this command to display or set the system time.

To use this command, your administrator account’s access control profile must have either w or rw permission to the sysgrp area. For details, see Permissions.

Syntax

execute time [<time_str>]

Variable Description Default

time [<time_str>]

Enter the current date for the FortiWeb appliance’s time zone, using the format hh:mm:ss, where:

  • hh is the hour. Valid hours are 00–23
  • mm is the minute. Valid minutes are 00–59.
  • ss is the second. Valid seconds are 00–59.

If you do not specify a time, the command returns the current system time.

Shortened values, such as 1 instead of 01 for the hour, are valid. For example, you could enter either 01:01:01 or 1:1:1.

No default.

Example

This example sets the system time to 15:31:03:

execute time 15:31:03

Related topics

time

Use this command to display or set the system time.

To use this command, your administrator account’s access control profile must have either w or rw permission to the sysgrp area. For details, see Permissions.

Syntax

execute time [<time_str>]

Variable Description Default

time [<time_str>]

Enter the current date for the FortiWeb appliance’s time zone, using the format hh:mm:ss, where:

  • hh is the hour. Valid hours are 00–23
  • mm is the minute. Valid minutes are 00–59.
  • ss is the second. Valid seconds are 00–59.

If you do not specify a time, the command returns the current system time.

Shortened values, such as 1 instead of 01 for the hour, are valid. For example, you could enter either 01:01:01 or 1:1:1.

No default.

Example

This example sets the system time to 15:31:03:

execute time 15:31:03

Related topics