Saving the date to actual bash history file

Solution 1:

This is a example of bash history ( when using HISTTIMEFORMAT )

#1625963751
sleep 45 ; ssh proxy.lan

the number 1625963751 is the unix timestamp ( https://en.wikipedia.org/wiki/Unix_time ) .

if you are using linux , date has a option to display this date in human form .

em444$ date -d @1625963751
Sat Jul 10 20:35:51 EDT 2021