From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/7] doc: glossary: add information for dates and timestamps
Date: Thu, 11 Mar 2021 02:45:32 -0800 [thread overview]
Message-ID: <20210311104538.7743-2-e@80x24.org> (raw)
In-Reply-To: <20210311104538.7743-1-e@80x24.org>
These have been confusing to me in the past, too.
---
Documentation/public-inbox-glossary.pod | 14 ++++++++++++++
lib/PublicInbox/Search.pm | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Documentation/public-inbox-glossary.pod b/Documentation/public-inbox-glossary.pod
index e188e563..61e1e9f8 100644
--- a/Documentation/public-inbox-glossary.pod
+++ b/Documentation/public-inbox-glossary.pod
@@ -83,6 +83,20 @@ the same email into one or more virtual folders for
ease-of-filtering. This is NOT tied to public-inbox names, as
messages stored by lei may not be public.
+=item IMAP INTERNALDATE, JMAP receivedAt, rt: search prefix
+
+The first valid timestamp value of Received: headers (top first).
+If no Received: header exists, the Date: header is used, and the
+current time if neither header(s) exist. When mirroring via
+git, this is the git commit time.
+
+=item IMAP SENT*, JMAP sentAt, dt: and d: search prefixes
+
+The first valid timestamp value of the Date: header(s).
+If no Date: header exists, the time from the Received: header is
+used, and then the current time if neither header exists.
+When mirroring via git, this is the git author time.
+
=head1 COPYRIGHT
Copyright 2021 all contributors L<mailto:meta@public-inbox.org>
diff --git a/lib/PublicInbox/Search.pm b/lib/PublicInbox/Search.pm
index 209969c5..c7d52daf 100644
--- a/lib/PublicInbox/Search.pm
+++ b/lib/PublicInbox/Search.pm
@@ -13,9 +13,9 @@ use POSIX qw(strftime);
# values for searching, changing the numeric value breaks
# compatibility with old indices (so don't change them it)
use constant {
- TS => 0, # Received: header in Unix time (IMAP INTERNALDATE)
+ TS => 0, # Received: in Unix time (IMAP INTERNALDATE, JMAP receivedAt)
YYYYMMDD => 1, # Date: header for searching in the WWW UI
- DT => 2, # Date: YYYYMMDDHHMMSS
+ DT => 2, # Date: YYYYMMDDHHMMSS (IMAP SENT*, JMAP sentAt)
# added for public-inbox 1.6.0+
BYTES => 3, # IMAP RFC822.SIZE
next prev parent reply other threads:[~2021-03-11 10:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 10:45 [PATCH 0/7] doc updates, fixups, and more Eric Wong
2021-03-11 10:45 ` Eric Wong [this message]
2021-03-11 10:45 ` [PATCH 2/7] searchidx: remove smsg_from_doc Eric Wong
2021-03-11 10:45 ` [PATCH 3/7] lei_curl: note proposed master/client mode for curl Eric Wong
2021-03-11 10:45 ` [PATCH 4/7] doc: update 1.7 release notes, tuning, TODO Eric Wong
2021-03-11 10:45 ` [PATCH 5/7] imapclient: disable workaround for Mail::IMAPClient 3.43+ Eric Wong
2021-03-11 20:34 ` [SQUASH] " Eric Wong
2021-03-11 10:45 ` [PATCH 6/7] config: use '-f' key to store config file pathname Eric Wong
2021-03-11 10:45 ` [PATCH 7/7] v2writable: fix undocumented --xapian-only Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210311104538.7743-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).