In 'man date' :
Quote:
-d, --date=STRING
display time described by STRING, not `now'
|
So to convert the date from the 'who -b' command, you can do something like :
date -d "$(who -b|tr -s " "|cut -d " " -f 4-)" +%s
The 'tr' command eliminates the multiple spaces at the start of the output string, and the 'cut' command extracts only the date and time.
$(...) gives the output of the command inside it.