* src/stat.c: Don't include fstimeprec.c.
(out_epoch_sec): Don't call fstimeprec.
* NEWS: Update description.
* doc/coreutils.texi: Likewise.
stat's %X, %Y, and %Z directives once again print only the integer
part of seconds since the epoch. This reverts a change from
coreutils-8.6, that was deemed unnecessarily disruptive. To obtain
- a full resolution time stamp for %X, use %.X; if you want (say) just
- 3 fractional digits, use %.3X. Likewise for %Y and %Z.
+ a nanosecond-precision floating point time stamp for %X use %.X;
+ if you want (say) just 3 fractional digits, use %.3X. Likewise
+ for %Y and %Z.
stat's new %W format directive would print floating point seconds.
However, with the above change to %X, %Y and %Z, we've made %W work
The @samp{%W}, @samp{%X}, @samp{%Y}, and @samp{%Z} formats accept a
precision preceded by a period to specify the number of digits to
-print after the decimal point. For example, @samp{%.9X} outputs the
-last access time to nanosecond precision. If a period is given but no
-precision, @command{stat} uses the estimated precision of the file
-system. When discarding excess precision, time stamps are truncated
+print after the decimal point. For example, @samp{%.3X} outputs the
+last access time to millisecond precision. If a period is given but no
+precision, @command{stat} uses 9 digits, so @samp{%.X} is equivalent to
+@samp{%.9X} When discarding excess precision, time stamps are truncated
toward minus infinity.
@example
$ stat -c '[%.3Y]' /usr
[1288929712.114]
$ stat -c '[%.Y]' /usr
- [1288929712.114951]
+ [1288929712.114951834]
@end example
The mount point printed by @samp{%m} is similar to that output
-Subproject commit 4baf5c1e594a65a315fbd5094eaeeb11f4630d18
+Subproject commit 6383a3bbe16d3615791568c030fed5bfe86a4381
#include "file-type.h"
#include "filemode.h"
#include "fs.h"
-#include "fstimeprec.h"
#include "getopt.h"
#include "mountlist.h"
#include "quote.h"
}
else
{
- static struct fstimeprec *tab;
- if (! tab)
- tab = fstimeprec_alloc ();
- precision = fstimeprec (tab, statbuf);
+ precision = 9;
}
if (precision && ISDIGIT (dot[-1]))