trouble searching with unix timestamps

Jani Nikula jani at nikula.org
Mon Jan 29 08:03:14 PST 2018


On Mon, 29 Jan 2018, Matthew Lear <matt at bubblegen.co.uk> wrote:
> Hi. I've noticed that I'm unable to notmuch search using date with unix
> timestamps (ie number of seconds since Jan 1st 1970 UTC). I get a xapian
> error. The notmuch man pages state that searching using
> 'date:<initial-timestamp>..<final-timestamp>'
> where "each timestamp is a number representing the number of seconds since
> 1970-01-01 00:00:00 UTC" is supported, so I'm wondering what's wrong with
> my installation.

The man page could use some clarification.

The <initial-timestamp>..<final-timestamp> syntax predates the date:
prefix, and needs to be given as-is:

$ notmuch search 1517152333..1517238733

Alternatively, you can use @<timestamp> in date: queries, although this
seems to be completely undocumented:

$ notmuch search date:@1517152333.. at 1517238733

HTH,
Jani.


More information about the notmuch mailing list