user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] xt/msgtime_cmp: fix false positives from msgtime change
@ 2020-04-04 23:51  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2020-04-04 23:51 UTC (permalink / raw)
  To: meta

commit d857e7dc0d816b635a7ead09c3273f8c2d2434be
("msgtime: assume +0000 if TZ missing when using Date::Parse")
introduced a behavior change which was causes false positives
when compared to the old code.

Update the "old" implementation to match this overdue behavior
change.
---
 xt/msgtime_cmp.t | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xt/msgtime_cmp.t b/xt/msgtime_cmp.t
index b77e57a6..4ebf5b2c 100644
--- a/xt/msgtime_cmp.t
+++ b/xt/msgtime_cmp.t
@@ -82,6 +82,13 @@ sub str2date_zone ($) {
 
 	# off is the time zone offset in seconds from GMT
 	my ($ss,$mm,$hh,$day,$month,$year,$off) = Date::Parse::strptime($date);
+
+	# new behavior which wasn't in the original old version:
+	if ('commit d857e7dc0d816b635a7ead09c3273f8c2d2434be') {
+		# "msgtime: assume +0000 if TZ missing when using Date::Parse"
+		$off //= '+0000';
+	}
+
 	return undef unless(defined $off);
 
 	# Compute the time zone from offset

^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2020-04-04 23:51  7% [PATCH] xt/msgtime_cmp: fix false positives from msgtime change Eric Wong

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).