NetBSD Problem Report #49479
From kre@munnari.OZ.AU Tue Dec 16 12:04:28 2014
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id C6BB7A654C
for <gnats-bugs@gnats.NetBSD.org>; Tue, 16 Dec 2014 12:04:28 +0000 (UTC)
Message-Id: <201412161201.sBGC1l29007731@perseus.noi.kre.to>
Date: Tue, 16 Dec 2014 19:01:47 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: mail/exmh desn't always append local time to Date: on display (+FIX)
X-Send-Pr-Version: 3.95
>Number: 49479
>Category: pkg
>Synopsis: mail/exmh desn't always append local time to Date: on display (+FIX)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 16 12:05:00 +0000 2014
>Closed-Date: Sat Dec 27 02:35:47 +0000 2014
>Last-Modified: Sat Dec 27 02:35:47 +0000 2014
>Originator: Robert Elz
>Release: NetBSD 6.99.17 (irrelevant) pkgsrc current 2014-12-16
>Organization:
Prince of Songkla University
>Environment:
System: NetBSD perseus.noi.kre.to 6.99.17 NetBSD 6.99.17 (GENERIC) #1: Fri Feb 22 22:09:50 ICT 2013 kre@jade.coe.psu.ac.th:/usr/obj/current/i386/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
exmh is intended to append the local to the Date: header
when it is displaying a message (if that is a different
time than the time in the Date: - ie: if the message was
posted from a different timezone than that in which it
is being viewed) - and it does - unless the Date: header
contains either a comment, or a +NNNN timezone indicator
(for any NNNN including +0000 - like most messages on the
NetBSD lists). For messages without comments, and with
tmezone indicators of -NNNN or (valid) alphabetic ones, it
worked fine.
>How-To-Repeat:
View the NetBSD mailing list using exmh - compare with messages
(from other sources, since NetBSD mail all seems to be
converted to +0000 - for whatever reason) from other sources
west of Greenwich (-0500 or similar timezone offsets)
>Fix:
Strictly, this might be considered a tcl bug, but if so, it is
in a tcl function that is documented as obsolete, and shouldn't
be used. Hence, patching exmh to use the more modern interface
to the tcl function seems like a better solution. While doing
that, also ignore comments, and special case -0000 (timezone
unknown) so it isn't converted (a gigo operation).
The patch below does that (it has been submitted upstream and
is likely to appear in the next exmh release, assuming that
ever happens).
In addition, the patch needs to be added to the distinfo
file, and PKREVISION++ in the Makefile.
kre
$NetBSD$
Patch to correct locatime display for messages in +NNNN timezones
(and ignore -0000) in Date: header when viewing messages.
Submitted upstream, and should be added to exmh cvs soon.
--- lib/mime.tcl 2013-09-16 11:48:55.000000000 +0700
+++ lib/mime.tcl 2014-12-16 08:59:57.000000000 +0700
@@ -1302,7 +1302,12 @@
global mime
catch {
- set msgtime [clock scan $time]
+ set msgtime [regsub -all {\([^)]*\)} $time {}]
+ set msgtime [string trim $msgtime]
+ if [regexp {.* -0000$} $msgtime] {
+ return
+ }
+ set msgtime [clock scan $msgtime -format "%a, %d %b %Y %T %Z"]
set localtime [clock format $msgtime -format " %T"]
if { [string first $localtime $time] == -1 } {
Preferences_Resource mime(localTimeFormat) localTimeFormat \
>Release-Note:
>Audit-Trail:
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/49479 CVS commit: pkgsrc/mail/exmh
Date: Sat, 27 Dec 2014 00:20:06 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Sat Dec 27 00:20:06 UTC 2014
Modified Files:
pkgsrc/mail/exmh: Makefile distinfo
Added Files:
pkgsrc/mail/exmh/patches: patch-lib_mime.tcl
Log Message:
Fix message date printing, from PR 49479; submitted upstream.
From Robert Elz.
PKGREVISION++
To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 pkgsrc/mail/exmh/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/mail/exmh/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/exmh/patches/patch-lib_mime.tcl
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 27 Dec 2014 02:35:47 +0000
State-Changed-Why:
Committed, thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.