環境変数 HISTTIMEFORMAT を .bashrc に設定することで、次回のログイン以降より history の実行結果にtimestampが付与される。
$ echo 'export HISTTIMEFORMAT="%F %T "' >> ~/.bashrc
参考
If the HISTTIMEFORMAT variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each displayed history entry. No time stamps are printed otherwise. (訳) HISTTIMEFORMAT 変数が設定されており、かつ空でない場合、その値は strftime(3) の書式文字列として使用され、表示される各ヒストリ(履歴)エントリに関連付けられたタイムスタンプが出力されます。それ以外の場合は、タイムスタンプは表示されません。 https://linuxcommand.org/lc3_man_pages/historyh.html