]> Sergey Matveev's repositories - public-inbox.git/commitdiff
doc: glossary: add information for dates and timestamps
authorEric Wong <e@80x24.org>
Thu, 11 Mar 2021 10:45:32 +0000 (02:45 -0800)
committerEric Wong <e@80x24.org>
Thu, 11 Mar 2021 20:35:10 +0000 (16:35 -0400)
These have been confusing to me in the past, too.

Documentation/public-inbox-glossary.pod
lib/PublicInbox/Search.pm

index e188e563db12e5e042d3279b7cdd0a1483ab7eb4..61e1e9f8b1f777422ed8160779d3def9c67c2445 100644 (file)
@@ -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>
index 209969c57c94b6a1d515d60c33e08a079da4f6f5..c7d52dafc3f4f9e37491aea50c6ac13880ee8b62 100644 (file)
@@ -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