Fortinet black logo

CLI Reference

date

date

Use this command to display or set the system date.

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 date <date_str>

Variable Description Default

date <date_str>

Enter the current date for the FortiWeb appliance’s time zone, using the format yyyy-mm-dd, where:

  • yyyy is the year. Valid years are 2001 to 2037.
  • mm is the month. Valid months are 01 to 12.
  • dd is the day of the month. Valid days are 01 to 31.

If you do not specify a date, the command returns the current system date. Shortened values, such as 06 instead of 2006 for the year or 1 instead of 01 for the month or day, are not valid.

No default.

Example

This example sets the date to September 23, 2017:

execute date 2017-09-23

Related topics

date

Use this command to display or set the system date.

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 date <date_str>

Variable Description Default

date <date_str>

Enter the current date for the FortiWeb appliance’s time zone, using the format yyyy-mm-dd, where:

  • yyyy is the year. Valid years are 2001 to 2037.
  • mm is the month. Valid months are 01 to 12.
  • dd is the day of the month. Valid days are 01 to 31.

If you do not specify a date, the command returns the current system date. Shortened values, such as 06 instead of 2006 for the year or 1 instead of 01 for the month or day, are not valid.

No default.

Example

This example sets the date to September 23, 2017:

execute date 2017-09-23

Related topics