Here is a small note on how to enable date and timestamp in shell command history on a Solaris system. In some vendor implementations of ksh, the EXTENDED_HISTORY variable can be set. However, the Solaris ksh does not implement EXTENDED_HISTORY. There are no provisions for providing date or timestamps in the ksh history.
Setting date and timestamp in bash shell command history
If date and time are required, use bash and set the HISTTIMEFORMAT variable. For example:
# export HISTTIMEFORMAT="%F %T "
This would show both date and time of the command execution in the output of history command.
# history 1 2017-09-24 11:10:22 export HISTTIMEFORMAT="%F %T " 2 2017-09-24 11:10:24 history
To only include command execution date in the output of history command, only assign value %F to the variable HISTTIMEFORMAT. For example :
# history 1 2017-09-24 export HISTTIMEFORMAT="%F " 2 2017-09-24 history
CentOS / RHEL : How to disable BASH shell history
UNIX / Linux : Examples of bash history command to repeat last commands