What is the option for date
to give output in a format acceptable to date --set
?
I'm trying to remotely set the date, using the current computer clock of my workstation.
ssh user@host sudo date --set="`date`"
and
ssh user@host sudo date --set="`date -R`"
both give "extra operand" and "invalid option" errors.
Yes, I know I can type --set="YYYY-MM-DD HH:mm:ss"
, but the computer should be able to do that for me.