Package: findutils
Version: 4.4.2-4
Severity: important

>From the manpage:

       -newerXY reference
           ...
           ... Time specifications are interpreted as for the argument
           to the -d option of GNU date. ...

But:

iwj@OSSTEST:/home/osstest/pub/logs$ date
Thu May 14 10:21:56 UTC 2015
iwj@OSSTEST:/home/osstest/pub/logs$ find -name \*ts-host-install-twice.log 
-newermt '16:18 EDT yesterday' -ls |grep 'May 13 16:45' 
5345699   12 -rw-rw-r--   1 iwj      osstest      9756 May 13 16:45 
./55661/test-amd64-i386-freebsd10-amd64/3.ts-host-install-twice.log
5253078   12 -rw-rw-r--   1 iwj      osstest      9640 May 13 16:45 
./55662/test-amd64-i386-freebsd10-i386/3.ts-host-install-twice.log
5601470   12 -rw-rw-r--   1 osstest  osstest     10314 May 13 16:45 
./55430/test-amd64-amd64-xl-qemut-win7-amd64/3.ts-host-install-twice.log
iwj@OSSTEST:/home/osstest/pub/logs$ date -d '16:18 EDT yesterday'
Wed May 13 20:18:00 UTC 2015
iwj@OSSTEST:/home/osstest/pub/logs$ date -d '16:18 EDT yesterday' +%s
1431548280
iwj@OSSTEST:/home/osstest/pub/logs$ find -name \*ts-host-install-twice.log 
-newermt '@1431548280' -ls |grep 'May 13 16:45' 
iwj@OSSTEST:/home/osstest/pub/logs$ 

Observe that:

  * The three files found by the `grep' were modified earlier than the
    specified time, as that time is interpreted by `date'.

  * Getting date to print the time_t, and passing the time_t to find,
    gives different answers.  If the documentation is correct, that
    ought never to be the case.

Sadly there doesn't seem to be a convenient way to get find to print
out exactly what it thought the date string meant.

Ian.


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to