<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>365</bug_id>
          
          <creation_ts>2010-09-29 20:29:13 +0000</creation_ts>
          <short_desc>[busybox] date command does not accept linux time setting format</short_desc>
          <delta_ts>2010-12-21 06:07:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>0.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.9 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jiajun Xu">jiajun.xu</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>kunwei.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>xianchao.zhang</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>10062</commentid>
    <comment_count>0</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-09-29 20:29:13 +0000</bug_when>
    <thetext>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&apos;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 -- &apos;h&apos;
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 &quot;date -R&quot; and check the output
5. Run &quot;date -s &quot;20080908&quot;&quot; and check the output</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10108</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-09-30 15:05:19 +0000</bug_when>
    <thetext>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&apos;t convert to local time)
            -R              Output RFC-822 compliant date string
            -I[SPEC]        Output ISO-8601 compliant date string
                            SPEC=&apos;date&apos; (default) for date only,
                            &apos;hours&apos;, &apos;minutes&apos;, or &apos;seconds&apos; for date and
                            time to the indicated precision
            -r FILE         Display last modification time of FILE
            -d TIME         Display TIME, not &apos;now&apos;
            -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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10135</commentid>
    <comment_count>2</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-10-03 08:01:52 +0000</bug_when>
    <thetext>Thanks for your explanation, it&apos;s clear for me now. Verify the bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>