unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Eric Wong <e@80x24.org>,
	meta@public-inbox.org, Bastien Guerry <bzg@gnu.org>
Subject: [PATCH] www: display Received: timestamp for dumped topics
Date: Sun, 05 Feb 2023 15:10:37 -0500	[thread overview]
Message-ID: <87y1pb27r6.fsf@kyleam.com> (raw)
In-Reply-To: <87o7q7di5i.fsf@localhost>

Ihor Radchenko writes:

> Eric Wong <e@80x24.org> writes:
[...]
>> Does this untested patch fix it?
>
> I am looking at https://list.orgmode.org/ and the thread still displays
> the future date "2023-10-29  1:04 UTC" as the last update time. Though
> ordering suggests that the future time was ignored when building recent
> thread list.

The "it" that I reported is the sorting, so as far as I can see it's
fixed.  With the "last update time", I suppose you're talking about the
second line below:

  [FEATURE REQUEST] Timezone support in org-mode datestamps and org-agenda
   2023-10-29  1:04 UTC  (110+ messages)
                                        ` [POLL] Proposed syntax for [...]

I don't care too much one way or the other, but it makes sense to me for
that to match the value that's actually used to sort the messages.
Eric, what about something like this?

-- >8 --
Subject: [PATCH] www: display Received: timestamp for dumped topics

As a follow-up to 0f19ca7e3ca6fc56 (www: sort all /$INBOX/ topics by
Received: timestamp, 2023-02-04), display the Received: timestamp
rather than Date: timestamp when dumping the topic so that the
displayed date aligns with the sorting.

Reported-by: Ihor Radchenko <yantar92@posteo.net>
Link: https://public-inbox.org/meta/87o7q7di5i.fsf@localhost/
---
 lib/PublicInbox/View.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index e5f748f7..384d7894 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -1093,7 +1093,7 @@ sub dump_topics {
 		my $href = mid_href($mid);
 		my $prev_subj = [ split(/ /, $top_subj) ];
 		$top_subj = ascii_html($top_subj);
-		$ds = fmt_ts($ds);
+		$ts = fmt_ts($ts);
 
 		# $n isn't the total number of posts on the topic,
 		# just the number of posts in the current results window
@@ -1107,7 +1107,7 @@ sub dump_topics {
 		}
 
 		my $s = "<a\nhref=\"$href/T/$anchor\">$top_subj</a>\n" .
-			" $ds UTC $n\n";
+			" $ts UTC $n\n";
 		while (@extra) {
 			my $level = shift @extra;
 			my $subj = shift @extra; # already normalized

base-commit: 0f19ca7e3ca6fc568a8713c5ececdb4d9fa577e6
-- 
2.39.1


  reply	other threads:[~2023-02-05 20:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-04 17:25 future date in Date header pinning thread to top of $inbox/ Kyle Meyer
2023-02-04 20:41 ` [PATCH] www: sort all /$INBOX/ topics by Received: timestamp Eric Wong
2023-02-04 21:16   ` Kyle Meyer
2023-02-05 19:30   ` Ihor Radchenko
2023-02-05 20:10     ` Kyle Meyer [this message]
2023-02-05 20:21       ` [PATCH] www: display Received: timestamp for dumped topics Eric Wong
2023-02-05 20:57         ` Kyle Meyer
2023-02-05 21:03         ` Ihor Radchenko

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=87y1pb27r6.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=bzg@gnu.org \
    --cc=e@80x24.org \
    --cc=meta@public-inbox.org \
    --cc=yantar92@posteo.net \
    /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.
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).