From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id BB3A26DE01E9 for ; Mon, 29 Jan 2018 08:21:20 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.719 X-Spam-Level: X-Spam-Status: No, score=-0.719 tagged_above=-999 required=5 tests=[AWL=0.000, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gcm9j_iUSSBD for ; Mon, 29 Jan 2018 08:21:20 -0800 (PST) X-Greylist: delayed 452 seconds by postgrey-1.36 at arlo; Mon, 29 Jan 2018 08:21:19 PST Received: from avasout06.plus.net (avasout06.plus.net [212.159.14.18]) by arlo.cworth.org (Postfix) with ESMTPS id A3A406DE01DB for ; Mon, 29 Jan 2018 08:21:19 -0800 (PST) Received: from mail.bubblegen.co.uk ([80.229.236.194]) by smtp with ESMTP id gC3we5xfgLydGgC3xeMPtz; Mon, 29 Jan 2018 16:13:42 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=DZU5VMlW c=1 sm=1 tr=0 a=G4bc5lkgapKKm1P+Twxy3Q==:117 a=G4bc5lkgapKKm1P+Twxy3Q==:17 a=RgaUWeydRksA:10 a=dFffnLBqAAAA:8 a=80hmnl3cAAAA:8 a=w21PQKPx7M2YXGtGCHUA:9 a=-6d8xzOClARgOjqZ:21 a=cf-eUGsiNLHPpTQl:21 a=QEXdDO2ut3YA:10 a=Vulnndmqxs_P7aedw4cA:9 a=5T1n-8wGdCsIqOON:21 a=n1qwat3Sfl0fxJpb:21 a=TlrrgjUNq5L98H52:21 a=C5QbMomrNMGY1MGetR0X:22 a=G-y4FhfbluXncOafXg4t:22 Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: matt) by mail.bubblegen.co.uk (Postfix) with ESMTPSA id BA7874622016 for ; Mon, 29 Jan 2018 16:13:39 +0000 (GMT) Received: by mail-lf0-f46.google.com with SMTP id f136so10774942lff.8 for ; Mon, 29 Jan 2018 08:13:39 -0800 (PST) X-Gm-Message-State: AKwxytft6YnZW8J7is3/qwchDU9ZrDkGfAsXmlFsrq4LHkj18XBXLP4b NB+G793FLIejUGW6rTqJ6L15JRQIWYLbNfA7PLc= X-Google-Smtp-Source: AH8x225f5XnR4e4mUBQsbYq28HdxEde34TeFC6KWatsZuDLH7sUFY8fYOXXPQ0OxCRXTujE4lg+0iwvzcCaH7kXGq/g= X-Received: by 10.46.16.210 with SMTP id 79mr9609112ljq.119.1517242418991; Mon, 29 Jan 2018 08:13:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.223.85 with HTTP; Mon, 29 Jan 2018 08:13:38 -0800 (PST) In-Reply-To: <874ln4zm7x.fsf@nikula.org> References: <874ln4zm7x.fsf@nikula.org> From: Matthew Lear Date: Mon, 29 Jan 2018 16:13:38 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: trouble searching with unix timestamps To: Jani Nikula Cc: notmuch@notmuchmail.org Content-Type: multipart/alternative; boundary="94eb2c1c049e6c19370563ec8765" X-CMAE-Envelope: MS4wfK//CwkqcLuAia3kLO/i+T76LVals4AjPF5fq6b7eWXX8tsjNiRdkaKgAcDooLzSoaDoM0RGrHPKG7cLOtYXxhxSeA5uehI9H6T766bZ0EWgMlc3+btJ 2lFEvYwX10P9PmBRwz5+xN2y0O0Tg3GsML9mDnzOUChWLkAXOxmjbn6oOyzpQNyCS8S6NHDBSTRJZQ== X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2018 16:21:20 -0000 --94eb2c1c049e6c19370563ec8765 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Wonderful! Thanks Jani. > Alternatively, you can use @ in date: queries, although this > seems to be completely undocumented: I guess this relates to similar syntax requirements of date -d in that a unix timestamp is required to be preceded by an @ # date -d 1517152333 date: invalid date =E2=80=981517152333=E2=80=99 # date -d @1517152333 Sun Jan 28 15:12:13 GMT 2018 On Mon, Jan 29, 2018 at 4:03 PM, Jani Nikula wrote: > On Mon, 29 Jan 2018, Matthew Lear 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 xapia= n > > error. The notmuch man pages state that searching using > > 'date:..' > > 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 wi= th > > my installation. > > The man page could use some clarification. > > The .. syntax predates the date: > prefix, and needs to be given as-is: > > $ notmuch search 1517152333..1517238733 > > Alternatively, you can use @ in date: queries, although this > seems to be completely undocumented: > > $ notmuch search date:@1517152333..@1517238733 > > HTH, > Jani. > --94eb2c1c049e6c19370563ec8765 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Wonderful! Thanks Jani.

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

I guess this relates to similar syntax requirements of date -d in tha= t a unix timestamp is required to be preceded by an @

<= div>
# date -d 1517152333
date: invalid date =E2=80=981517152333=E2=80=99
<= div>
# date -d @1517152333
Sun Jan 28 15:12:13 GMT 2018
=

On Mo= n, Jan 29, 2018 at 4:03 PM, Jani Nikula <jani@nikula.org> wrot= e:
On Mon, 29 Jan 2018, = Matthew Lear <matt@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 xapi= an
> error. The notmuch man pages state that searching using
> 'date:<initial-timestamp>..<final-timestamp>'=
> where "each timestamp is a number representing the number of seco= nds since
> 1970-01-01 00:00:00 UTC" is supported, so I'm wondering what&= #39;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 th= is
seems to be completely undocumented:

$ notmuch search date:@1517152333..@1517238733

HTH,
Jani.

--94eb2c1c049e6c19370563ec8765--