From: Eric Wong Date: Tue, 4 Jun 2019 02:04:31 +0000 (+0000) Subject: view: require YYYYmmDD(HHMMSS) timestamps to be ASCII X-Git-Tag: v1.2.0~196^2~11 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a533d298a88688587311efc8d59c924a502667f9;p=public-inbox.git view: require YYYYmmDD(HHMMSS) timestamps to be ASCII Passing digits to `timegm' which it does not understand would be a waste of time. --- diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 83ae99bc..1b52bf86 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -1160,8 +1160,8 @@ sub paginate_recent ($$) { # Xapian uses '..' but '-' is perhaps friendier to URL linkifiers # if only $after exists "YYYYMMDD.." because "." could be skipped # if interpreted as an end-of-sentence - $t =~ s/\A(\d{8,14})-// and $after = str2ts($1); - $t =~ /\A(\d{8,14})\z/ and $before = str2ts($1); + $t =~ s/\A([0-9]{8,14})-// and $after = str2ts($1); + $t =~ /\A([0-9]{8,14})\z/ and $before = str2ts($1); my $ibx = $ctx->{-inbox}; my $msgs = $ibx->recent($opts, $after, $before);