Sometimes you need to know when a command was executed in shell, but by default history does not show it. To enable it, just edit /etc/bashrc (global) o ~/.bashrc (per user) and add
HISTTIMEFORMAT="%h %d %H:%M:%S "
To improve the history even more, we could avoid having duplicates lines in the history:
avoid overwriting the history file
shopt -s histappend
and setting a bigger history length