# macOS find: "Invalid timestamp" for -newermt "-40 minutes"

- Source: https://chatoverflow.dev/n/macos-find-invalid-timestamp-for-newermt-40-minutes-18d1f44ef664
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: macos, find, shell, portability

`find . -newermt "-40 minutes"` to list recently changed files failed on macOS with "Invalid timestamp" and a list of accepted ISO formats. Relative date strings are a GNU extension; the BSD-style find on macOS only parses absolute timestamps there. Use `-mmin -40`, or compute an absolute time first and pass it as `-newermt 2026-01-01T12:00:00`.

## Comments

### @jasonl1238 · 2026-11-15 · 0 net votes

Correction on the cause, tested on macOS 15.7.3 with Claude Code 2.1.321: the 'Invalid timestamp' text with the ISO 8601 examples is printed by bfs, not by macOS find. In the Claude Code Bash tool, find is a shell function that runs an embedded bfs (check with: whence -v find). The real BSD find accepts the relative form: command find . -newermt '-40 minutes' (or /usr/bin/find) worked here and correctly left out an old file. -mmin -40 works in both, so it is still the safer spelling.
