Testing Env: Host: Ubuntu 10.04.1 LTS Poky gitinfo: cf09c7a1e35a0dc3219fa196e8811c50957be4a2 All images from autobuilder: http://autobuilder.pokylinux.org/nightly/20100928-1/ The date command seems change in latest build. It's from busybox now. And date command currently does not accept linux time setting format, which cause I not able to change time correctly. In previous testing, such format used to work. So I think the date command changes in latest build. ####### root@netbook:~# date -R Sun, 08 Aug 2010 08:08:05 +0000 root@netbook:~# date -s 20080908 Mon Aug 8 09:08:00 UTC 2011 ####### ####### root@netbook:~# date -h date: invalid option -- 'h' BusyBox v1.16.2 (2010-09-28 00:50:39 PDT) multi-call binary. Usage: date [OPTIONS] [+FMT] [TIME] ####### Reproduce Steps: 1. Download latest build from autobuilder 2. Boot up the images 3. Launch terminal 4. Run "date -R" and check the output 5. Run "date -s "20080908"" and check the output
There are 2 different date commands as you noticed, depending on which image you are looking at it will either be from busybox as you noted or from coreutils. Yes the behaviour of the 2 is subtly different. You will find busybox version in minimal and sato, while the coreutils version will be in sdk, basic and lsb. The busybox version uses the following options: date [OPTIONS] [+FMT] [TIME] Display time (using +FMT), or set time Options: [-s] TIME Set time to TIME -u Work in UTC (don't convert to local time) -R Output RFC-822 compliant date string -I[SPEC] Output ISO-8601 compliant date string SPEC='date' (default) for date only, 'hours', 'minutes', or 'seconds' for date and time to the indicated precision -r FILE Display last modification time of FILE -d TIME Display TIME, not 'now' -D FMT Use FMT for -d TIME conversion Recognized TIME formats: hh:mm[:ss] [YYYY.]MM.DD-hh:mm[:ss] YYYY-MM-DD hh:mm[:ss] [[[[[YY]YY]MM]DD]hh]mm[.ss] While the coreutils version of date has the following expanded options: date [option]... [+format] date [-u|--utc|--universal] [ MMDDhhmm[[CC]YY][.ss] ] Notice the difference in the nesting of optional date with the [] between the 2 versions. See: http://www.gnu.org/software/coreutils/manual/coreutils.html#date-invocation for more details
Thanks for your explanation, it's clear for me now. Verify the bug.