Correctly format the nanoseconds by padding out to 9 digits. Document this with text from the FreeBSD manpage. Without this change a file modified on the first nanosecond of a second (N.000000001) would be reported to have been modified at precicely 100ms into the second (N.100000000). Index: mtree.8 =================================================================== --- mtree.8 (revision 240766) +++ mtree.8 (revision 240767) @@ -492,7 +492,10 @@ These may be specified without leading or trailing commas, but will be stored internally with them. .It Sy time -The last modification time of the file. +The last modification time of the file, +in second and nanoseconds. +The value should include a period character and exactly nine digits after +the period. .It Sy type The type of the file; may be set to any one of the following: .Pp Index: create.c =================================================================== --- create.c (revision 240766) +++ create.c (revision 240767) @@ -215,11 +215,11 @@ (long long)p->fts_statp->st_size); if (keys & F_TIME) #if defined(BSD4_4) && !defined(HAVE_NBTOOL_CONFIG_H) - output(indent, &offset, "time=%ld.%ld", + output(indent, &offset, "time=%ld.%09ld", (long)p->fts_statp->st_mtimespec.tv_sec, p->fts_statp->st_mtimespec.tv_nsec); #else - output(indent, &offset, "time=%ld.%ld", + output(indent, &offset, "time=%ld.%09ld", (long)p->fts_statp->st_mtime, (long)0); #endif if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) { Index: spec.c =================================================================== --- spec.c (revision 240766) +++ spec.c (revision 240767) @@ -358,7 +358,7 @@ if (MATCHFLAG(F_SIZE)) appendfield(pathlast, "size=%lld", (long long)cur->st_size); if (MATCHFLAG(F_TIME)) - appendfield(pathlast, "time=%lld.%ld", + appendfield(pathlast, "time=%lld.%09ld", (long long)cur->st_mtimespec.tv_sec, cur->st_mtimespec.tv_nsec); if (MATCHFLAG(F_CKSUM))