9

In bash, the following works for setting the date from a UNIX timestamp ( seconds from the epoch ):

date +%s -s @`date +%s`

In Busybox, this does not work. How can I do the same for the date command with Busybox? Thanks.

1 Answer 1

9

Try

date @`date +%s`

I don't think it's got anything to do with bash.

Busybox's date command is a lightweight version of the more classic GNU/FSF date

1
  • FWIW, this should now read: date -su `date ++%s` to properly set the clock with the resultant UTC string.
    – WhiteRau
    Commented Feb 22 at 18:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .