Skip to content
Myr

Change time comparisons to exclusive

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Closes #794

authored by Jacob Mischka · committed by David Peter · parent fe99270 · Browse files · 3 files+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+5 added−4 removed

  • other:+5 added−4 removed

3 files+5 added−4 removed

modified:doc/fd.1+2 added-2 removed
267 unmodified lines
268.RE269.TP270.BI "\-\-changed-within " date|duration271Filter results based on the file modification time.272Files with modification times greater than or equal to the argument will be returned.272Files with modification times greater than the argument will be returned.273The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point274in time in either full RFC3339 format with time zone, or as a date or datetime in the275local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).276.B --change-newer-than
4 unmodified lines
281 \-\-change-newer-than "2018-10-27 10:00:00"282.TP283.BI "\-\-changed-before " date|duration284Filter results based on the file modification time.285Files with modification times less than or equal to the argument will be returned.285Files with modification times less than the argument will be returned.286The argument can be provided as a duration (\fI10h, 1d, 35min\fR) or as a specific point287in time in either full RFC3339 format with time zone, or as a date or datetime in the288local time zone (\fIYYYY-MM-DD\fR or \fIYYYY-MM-DD HH:MM:SS\fR).289.B --change-older-than
152 unmodified lines
modified:src/filter/time.rs+2 added-2 removed
37 unmodified lines
38 }3940 pub fn applies_to(&self, t: &SystemTime) -> bool {41 match self {42 TimeFilter::Before(limit) => t <= limit,43 TimeFilter::After(limit) => t >= limit,42 TimeFilter::Before(limit) => t < limit,43 TimeFilter::After(limit) => t > limit,44 }45 }46}47
84 unmodified lines
modified:CHANGELOG.md+1 added
24 unmodified lines
25- Use local time zone for time functions (`--change-newer-than`, `--change-older-than`), see #631 (@jacobmischka)26- Support `--list-details` on more platforms (like BusyBox), see #78327- The filters `--owner`, `--size`, and `--changed-{within,before}` now apply to symbolic links28 themselves, rather than the link target, except when `--follow` is specified; see #86329- Change time comparisons to be exclusive, see #794 (@jacobmischka)3031## Changes3233- Apply custom `--path-separator` to commands run with `--exec(-batch)` and `--list-details`, see #697 (@aswild)
509 unmodified lines