From MAILER-DAEMON Fri Oct 15 09:57:14 2021
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1mbNhw-0008B2-33
	for mharc-bug-diffutils@gnu.org; Fri, 15 Oct 2021 09:57:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46498)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1mbNhn-00087A-KP
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 09:57:03 -0400
Received: from debbugs.gnu.org ([209.51.188.43]:56941)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1mbNhm-0000mO-Fn
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 09:57:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1mbNhm-0001Dv-Al
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 09:57:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Vladimir Marek <Vladimir.Marek@oracle.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Fri, 15 Oct 2021 13:57:02 +0000
Resent-Message-ID: <handler.51228.B.16343061784640@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 51228
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: 51228@debbugs.gnu.org
X-Debbugs-Original-To: bug-diffutils@gnu.org
Received: via spool by submit@debbugs.gnu.org id=B.16343061784640
 (code B ref -1); Fri, 15 Oct 2021 13:57:02 +0000
Received: (at submit) by debbugs.gnu.org; 15 Oct 2021 13:56:18 +0000
Received: from localhost ([127.0.0.1]:40254 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1mbNh4-0001Cl-BC
 for submit@debbugs.gnu.org; Fri, 15 Oct 2021 09:56:18 -0400
Received: from lists.gnu.org ([209.51.188.17]:39126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vladimir.marek@oracle.com>) id 1mbNh1-0001Cb-Cd
 for submit@debbugs.gnu.org; Fri, 15 Oct 2021 09:56:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46380)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <vladimir.marek@oracle.com>)
 id 1mbNh1-0007W2-0x
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 09:56:15 -0400
Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:53540)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <vladimir.marek@oracle.com>)
 id 1mbNgx-00009D-TY
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 09:56:14 -0400
Received: from pps.filterd (m0246627.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19FCeSFi022056
 for <bug-diffutils@gnu.org>; Fri, 15 Oct 2021 13:56:09 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=date : from : to :
 subject : message-id : content-type : mime-version; s=corp-2021-07-09;
 bh=5PyZAS8KbwjZOHcYPPQhLB817m0yiSFmBs3JPcedSBQ=;
 b=fBB3VNAYKq4KlPECDlMO2KrtOFvyFneK8WbdN0ukDuqv2J93ouLC53WIyyV7Kup3pQMW
 wTc5kVPQ7VgQwNjnfyNZhNBrcDKRg6PRRljJXBCBb2TTBrh29B9OjgcRkeXv0WGVz/+I
 wsa7j75X1FHaCwwq+IdU3uOkbqGX3q2GDgV6nw8FoK56tgTlue578FTgl/+Kf++b0KFL
 3/Tkq4B1wpqEJayUe4QMKdKyFKkMYe7cUmWkzZPHmUwnYGZuE9NcX65sEjQXItX85H2U
 fxWh6X+lvVpy1HNTkMlDgaqCtREqHafslYPTEN10cy3btCr6XJydyYeqC9lAYLA5vrvr Yg== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by mx0b-00069f02.pphosted.com with ESMTP id 3bpfvegtx2-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-diffutils@gnu.org>; Fri, 15 Oct 2021 13:55:39 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19FDpKv2187094
 for <bug-diffutils@gnu.org>; Fri, 15 Oct 2021 13:55:27 GMT
Received: from nam12-mw2-obe.outbound.protection.outlook.com
 (mail-mw2nam12lp2048.outbound.protection.outlook.com [104.47.66.48])
 by userp3020.oracle.com with ESMTP id 3bkyvfry2y-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <bug-diffutils@gnu.org>; Fri, 15 Oct 2021 13:55:26 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Ryw+1zpr2aIXUeLq/3J5K8QLXFr21sr0+elnViHo6eKX4pmgAYqZK0yKi8LSF4Nl6JQCd4PvkoPb5vc0kxQ4Bj0lS/PA7iIjtOzEc0YiUGCOE6vxCNtaugVpE3B/6pN5OAY6bBJP+DVOKrJF2f4+rlDObhkC3l9iVS9CqPSvjmdvaa9LFZaLo7QvHE/OsQoHCoQ62tiIpFfKIILkoEsnZk4VQO8nxB49+D50GPBR+qgHtwanHz3OIRAIcZ+tkKVrPI74CVNj+8ycckz6HOlH5pPlR479aiGmGbfd2IWVbJrE2yo0PScPGtfeeNlbbRX3srQwFLJhND6F2vyOux9KTA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=5PyZAS8KbwjZOHcYPPQhLB817m0yiSFmBs3JPcedSBQ=;
 b=cUin3WoylK62Zp6EeU39c9AKMz8lTEpk7K5YrdwT/XZhFdbnAmv9yHgAuh/PtT1ZKojJWbgXZ+TnOR5udwdQs89pfbHaezY38NE/3yfrfuQgzGqKuealil26DPrAzPCWGu+g5liITnsbvxgVubfrst1RtUK7WEi2U6P9Wbe6yOWf9iKWdYyE1FqWSK5uPLOPLktmBCbJRRYA1uCUo0m0I9mkhJDL7ssweKzM+J3HzdBeOTxqga+FFJjmAM19UVuGsKYnK0EFyHAqkGe1Wru3RqKMDPnHZyzossB5IAwZ4X7zQa28lwhd9pKYXqyfXaK4ngIxhhCu/G/VKPkM2H69pQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=5PyZAS8KbwjZOHcYPPQhLB817m0yiSFmBs3JPcedSBQ=;
 b=g6Ml3pZ3OL1gPMm3e9Kha8WzJkrvmwUI54DUfMtLqtxgyW1eonFOtLxED2NoRRbOoKVgIzRasDeiVouwnediuWTEIK3ZW7QRc25ASVYML1tXMIrzW8JozvSjpEgkIeUkKPNYkoL97R8TgUC4z+CNzAkTvL08XQLHqaZEQ/GVQ84=
Authentication-Results: gnu.org; dkim=none (message not signed)
 header.d=none;gnu.org; dmarc=none action=none header.from=oracle.com;
Received: from BY5PR10MB3780.namprd10.prod.outlook.com (2603:10b6:a03:1ff::14)
 by BY5PR10MB3858.namprd10.prod.outlook.com (2603:10b6:a03:1b2::15)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15; Fri, 15 Oct
 2021 13:55:24 +0000
Received: from BY5PR10MB3780.namprd10.prod.outlook.com
 ([fe80::25b5:a4e0:d5bf:584a]) by BY5PR10MB3780.namprd10.prod.outlook.com
 ([fe80::25b5:a4e0:d5bf:584a%5]) with mapi id 15.20.4608.017; Fri, 15 Oct 2021
 13:55:24 +0000
Date: Fri, 15 Oct 2021 15:55:17 +0200
From: Vladimir Marek <Vladimir.Marek@oracle.com>
Message-ID: <20211015135517.sez2ysh2jogaotl3@virtual.cz.oracle.com>
Content-Type: multipart/mixed; boundary="lr2nyysl7lihpmim"
Content-Disposition: inline
X-ClientProxiedBy: LO2P123CA0014.GBRP123.PROD.OUTLOOK.COM
 (2603:10a6:600:a6::26) To BY5PR10MB3780.namprd10.prod.outlook.com
 (2603:10b6:a03:1ff::14)
MIME-Version: 1.0
Received: from virtual.cz.oracle.com (138.3.204.11) by
 LO2P123CA0014.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::26) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4608.15 via Frontend Transport; Fri, 15 Oct 2021 13:55:23 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 084a3dae-900f-4065-46b3-08d98fe36f93
X-MS-TrafficTypeDiagnostic: BY5PR10MB3858:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS: <BY5PR10MB3858A6225AB66E6700AC7AAFFDB99@BY5PR10MB3858.namprd10.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:10000;
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: MSu2flgt+rkIWApQLqXGYf69cgo4s3rnRJWrD9No7qdLXK0y+W4Siv9lhgL0VXK9qAvEE0OurrRKTIyMc5Ooug77lJ1aSyJPKS/uZ+ulwUxsfsOHQKeg0NbQkt0iNDmFPlGF7JVVTVHJC3XwY814fn6LotwOzRRYduDUMKjOw4MNVpZDETGmQbGLQpiFKpaOo172yqsjb7Btxk3kTb79SAvapayB4TAuGVYHWfc8M6HuDVetuxQUZRhaBCI20MYrq+tth/Pzo/NXMyQyZCSL54ltvBMHEp0MmXyup71uUxmxW2YQp+rcxk1o6z6ZgdZgWVxevwLg/8nJ6IiG3IXDC5sCwtPyL93cWHOr5GWX6z63E1sDIyFjO9aDYTMqr2pzznVvgIPtxm2CeReU9H9idSZ/Qgxn/FxFgWivJKvptSyd8H+7dOh58wsfWlTwBQRJWLXjBHXvF6RSp8QGu/Zk0V27HvszkUpkJkLHnFfeovm9Oi9tSXPD/qU1uI5xg9RutnSmRkprZDP5ypfgffs64kWEaJWVhe6GUsepeJ0iX6lyPwLDND2C8+xAI70EXZcRnb4xGmfaVy3tvldaN/l+hyFfi+V7zqkahtrF+YrGCe5HQLsxrM+J5bvjwvlGarULl+PBO3BjLsqnheISJE16QWyWxd/yiCPwlGf7Th1BnU/J5Fh+rPBdXH7cZc/+3Qdjm4XPABjgIqXlQUi73HI2GTQmgZq7PJwT1g91ayrsCJDLtXUYlvQMzgJQ8V6ECdAwfg7atsLiMBXmmBcbwfKI+DCft5fFHlo6uCrgNjWuZN4ndiBKcnCB3wKR8FuoXX+w
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; 
 IPV:NLI; SFV:NSPM;
 H:BY5PR10MB3780.namprd10.prod.outlook.com; PTR:; CAT:NONE; 
 SFS:(366004)(38100700002)(66946007)(2906002)(38350700002)(6666004)(66476007)(66556008)(8936002)(316002)(86362001)(26005)(8676002)(5660300002)(33964004)(4001150100001)(55016002)(44144004)(83380400001)(508600001)(956004)(52116002)(966005)(186003)(7696005)(6916009)(1076003)(235185007)(2700100001);
 DIR:OUT; SFP:1101; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: h8r390c5v6/FSnUZF6zsxmAWVrt3K14yelviwhUxrR/0ZOOIgfL3kuDEZCwCgAnKsVeYmUxcmX++cJFrhRtzl3owpKRyTsrMFKIGjTEJpYw9/lQvoLmK84TRT5Y/YxD+aj/DY4cGXS1R5xyOwSATuULVIGBveMCEF9gq5TlT5XH9F8hzsO5FQZCnMUZ1AwOMBlAfY3JVxCWRmjRsX+04Hh9/0ePc/Ab/X9OP9fZ3or54xWFNudt+OJ//kBh1qEXpivd9lFTsmKennIr9ScqXXc5we+ZOceiWa6tiAiLv4JSYkSHWx2bahRHYauxQ+hjuR629mhfWiO5oO5525PDW2ZOIklSHt6R+2RqZ9krQpMqq9SebpmThr5NsdjkcC1bA+CfvY7y/ZpgGLGX2jgJA7sfDVwttsGbxO80620nazX+Zj6YCnmb6qyVmrEZ7aS9gnkrmMW1lQUPw0g+WmqccDRYByr1iCtzBevP1e3LV+Zokxlcb36g6wQLh818/W+N8kTAPbqivl4rgmdiUXCiUr8kjZpETRyX5ZDFYlfQXifL1ZXjBduZEfI97rmlhTcCIgRzdxxBp1quURxk5ca6LDtJCxjUztRQ+/SRuoqjA6b2McnYUWUtrWvJNIhRsEzEoYG2yuu3ZimdotSCFdn+D5iho7/yqUsMwBqIWTaPtpEnYpVKLjvxhuGQhGM8G9Buj+SM7Ulapo7Lb7srkce4iN5ke2xGeggVs0m7uaUOEjRFbtlI6o8ZcBw2JJ5rxDLD7acbKFAz6GLnb9tubtgEc323Cm4znU7uIMY22Wm1XtqjEjlWbW9v/2GbzZNIG/SeiELz8/GeZsadUeXZmd/PpWOWXuw+q664znSIbWop69JYP4skDwGYluLoZw0b9M4hqIHxYcyge8jozQ6P7MsN3k+ZLgwhs2iakoO5bAG6W2qk+JhR2SbfhPc0WrcfGq8pKkIpSANNFYXs5kFwjryUG5Jf360ri/WLoO0t3wCiQ+rP/5ih89TrWouIv9XSTNdr1bR6UhqFM80y4pGNBqvArWmtKijieGJbkX2Dq6iIbnyBzR7L4esZbgyHVLgGlyruUn/NxnUzkzy8lBDvwT25HczxpAo1BHqTpT8vCx75MqW/5+eVmWYHyIbalMsjMJhRhpSUdcwV/VOiiF0N70C9HRlh7vzJ2k4Qt+HYMbk1T1OPfCDzDSfCilkZtxkeblTsRmfEvWPsC16Wa0i8mSihTHaKCgdxqUlolVEyLcT0dZAxmP42OJ6dUUhzgUHSZEsBdD9v+ahbnwKRAGbkL5nSycx24DkBm39uT38xecp3VxRXfH/MBO+DU00IPD33ne+20
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 084a3dae-900f-4065-46b3-08d98fe36f93
X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB3780.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2021 13:55:24.4745 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: c+FyNsK5XZevbkXljGkwxnz8O/9suzWv7iuf3NnKrZlNYYSk2+VCcxjNPzsbYGYrg1NcT6SFcjnz8QhjZJn1QM3cHjXaEfWa2DtDc7Zmn5s=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB3858
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10137
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0
 malwarescore=0
 adultscore=0 bulkscore=0 mlxscore=0 spamscore=0 mlxlogscore=999
 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2109230001 definitions=main-2110150085
X-Proofpoint-GUID: P4TqoyrfUO9gg4NNEK6UC784LOZMZ4nd
X-Proofpoint-ORIG-GUID: P4TqoyrfUO9gg4NNEK6UC784LOZMZ4nd
Received-SPF: pass client-ip=205.220.165.32;
 envelope-from=vladimir.marek@oracle.com; helo=mx0a-00069f02.pphosted.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_BL=0.001, 
 RCVD_IN_MSPIKE_L3=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -2.3 (--)
Subject: [bug-diffutils] bug#51228: Incorrect timezone in unified diff on
 Solaris?
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
 <mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
 <mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Oct 2021 13:57:04 -0000

--lr2nyysl7lihpmim
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

Hi,

I believe that this is bug in diffutils, but I am not entirely sure. The
problem manifested itself while testing patchutils on Solaris. One of
the tests was failing. Upon closer inspection the filterdiff (aka
lsdiff) decides whether a give chunk is creating (or deleting) a file
based on timestamp the chunk is having. It compares whether the timezone
recorded equals to current timezone.

https://github.com/twaugh/patchutils/blob/master/src/filterdiff.c#L156

On Solaris patchutils correctly detect that there is no
struct tm ->  tm_gmtoff (HAVE_TM_GMTOFF). On line 1417 of nstrftime.c

 1415 #if HAVE_TM_GMTOFF
 1416             diff = tp->tm_gmtoff;
 1417 #else
 1418             if (!tz)
 1419               diff = 0;
 1420             else

And since there is zero tz specified in context.c

if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec)))
                                                         ^^^

The resulting chunk has zero timezone offset (on Solaris). Like here:

$ TZ=EST+5 gdiff -urN dir.orig dir
diff -urN dir.orig/a dir/a
--- dir.orig/a  1969-12-31 19:00:00.000000000 +0000  <------ this file is missing
+++ dir/a       2021-10-14 12:24:20.785102347 +0000

On Linux and after my fix on Solaris the result is

--- dir.orig/a  1969-12-31 19:00:00.000000000 -0500

I am not entirely sure where is nstrftime.c coming from, so I'm
reporting the issue here. I am also attaching patch I plan to use on
Solaris. The patch and additional test works for me on diffutils 3.8 on
both Linux and Solaris.

Thanks for diffutils, I believe it's the most important tool for release
engineer :)

Cheers
-- 
	Vlad

--lr2nyysl7lihpmim
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="timezone.patch"

Solaris does not support tm_gmtoff and diffutils in such case defaults to zero
time offset no matter what timezone is being currently used. That manifests
when creating patch with new and/or deleted files.

 $ TZ=EST+5 gdiff -urN dir.orig dir
 diff -urN dir.orig/a dir/a
 --- dir.orig/a  1969-12-31 19:00:00.000000000 +0000  <------ this file is missing
 +++ dir/a       2021-10-14 12:24:20.785102347 +0000

The correct line should be
 --- dir.orig/a  1969-12-31 19:00:00.000000000 -0500


This issue was found by failing patchutils test case. Patchutils detect new
and/or deleted file by looking at the timestamp. It incorrectly assumes that
this is not new file creation but rather modification of existing file. And
it's test 'lsdiff2' fails.


--- diffutils-3.8/lib/nstrftime.c
+++ diffutils-3.8/lib/nstrftime.c
@@ -1416,7 +1416,10 @@ #if HAVE_TM_GMTOFF
             diff = tp->tm_gmtoff;
 #else
             if (!tz)
-              diff = 0;
+              {
+                time_t now = time(0);
+                diff = timegm(localtime(&now)) - now;
+              }
             else
               {
                 struct tm gtm;
--- diffutils-3.8/tests/Makefile.am
+++ diffutils-3.8/tests/Makefile.am
@@ -22,7 +22,8 @@ stdin \
   strcoll-0-names \
   filename-quoting \
   strip-trailing-cr \
-  colors
+  colors \
+  timezone
 
 XFAIL_TESTS = large-subopt
 
--- diffutils-3.6/tests/timezone
+++ diffutils-3.6/tests/timezone
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+TZ=EST+5
+export TZ
+
+TZ_OFFSET=-0500
+
+mkdir -p dir-empty dir
+echo a > dir/a
+
+returns_ 0 diff -urN dir-empty dir > out || fail=1
+STRING=$( grep ^--- out )
+if [[ $STRING == *$TZ_OFFSET ]]; then
+  exit 0
+else
+  fail_ "The timezone should be $TZ_OFFSET, but it is $STRING" 
+  exit 1
+fi

--lr2nyysl7lihpmim--




From MAILER-DAEMON Fri Oct 15 22:06:05 2021
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1mbZ5I-00017s-Uy
	for mharc-bug-diffutils@gnu.org; Fri, 15 Oct 2021 22:06:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48384)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1mbZ5G-00014m-Ox
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 22:06:02 -0400
Received: from debbugs.gnu.org ([209.51.188.43]:57329)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1mbZ5G-00076G-Dg
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 22:06:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1mbZ5G-0004Mk-4b
 for bug-diffutils@gnu.org; Fri, 15 Oct 2021 22:06:02 -0400
Resent-From: Paul Eggert <eggert@cs.ucla.edu>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-To: bug-diffutils@gnu.org
Resent-Date: Sat, 16 Oct 2021 02:06:01 +0000
Resent-Message-ID: <handler.51228.D51228.163434994816756.done@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: cc-closed 51228
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: Vladimir Marek <Vladimir.Marek@oracle.com>
Cc: 51228-done@debbugs.gnu.org
Mail-Followup-To: 51228@debbugs.gnu.org, eggert@cs.ucla.edu,
 Vladimir.Marek@oracle.com
Received: via spool by 51228-done@debbugs.gnu.org id=D51228.163434994816756
 (code D ref 51228); Sat, 16 Oct 2021 02:06:01 +0000
Received: (at 51228-done) by debbugs.gnu.org; 16 Oct 2021 02:05:48 +0000
Received: from localhost ([127.0.0.1]:40642 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1mbZ51-0004MC-NR
 for submit@debbugs.gnu.org; Fri, 15 Oct 2021 22:05:48 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35088)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@cs.ucla.edu>) id 1mbZ4z-0004Lt-Io
 for 51228-done@debbugs.gnu.org; Fri, 15 Oct 2021 22:05:46 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 538FF1600EA;
 Fri, 15 Oct 2021 19:05:39 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id G4auXImebi1x; Fri, 15 Oct 2021 19:05:37 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 01F6B1600FD;
 Fri, 15 Oct 2021 19:05:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id NbWRWb0xL9SQ; Fri, 15 Oct 2021 19:05:36 -0700 (PDT)
Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com
 [172.91.119.151])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id CB6901600EA;
 Fri, 15 Oct 2021 19:05:36 -0700 (PDT)
References: <20211015135517.sez2ysh2jogaotl3@virtual.cz.oracle.com>
From: Paul Eggert <eggert@cs.ucla.edu>
Organization: UCLA Computer Science Department
Message-ID: <c4c165b3-d748-ee43-4ac6-a0c6a3f9c785@cs.ucla.edu>
Date: Fri, 15 Oct 2021 19:05:36 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <20211015135517.sez2ysh2jogaotl3@virtual.cz.oracle.com>
Content-Type: multipart/mixed; boundary="------------34BBE85133F6C4488F32F2EB"
Content-Language: en-US
X-Spam-Score: -2.4 (--)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -3.4 (---)
Subject: [bug-diffutils] bug#51228: bug#51228: Incorrect timezone in unified
 diff on Solaris?
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
 <mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
 <mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 16 Oct 2021 02:06:03 -0000

This is a multi-part message in MIME format.
--------------34BBE85133F6C4488F32F2EB
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

On 10/15/21 6:55 AM, Vladimir Marek wrote:

> I am not entirely sure where is nstrftime.c coming from, so I'm
> reporting the issue here.

Thanks for reporting it. Although nstrftime.c comes from Gnulib, this is=20
a diffutils bug: the 0 diffutils passes to nstrftime stands for=20
Universal Time (UT), whereas local time is wanted. This bug is not=20
triggered on GNU/Linux or the BSDs, which have tm_gmtoff in their=20
struct tm.

I installed the attached patch into diffutils. Please give it a try, as=20
the patch you sent mishandles the case when today's UT offset differs=20
from the UT offset in effect when the file was last modified (e.g., due=20
to a daylight-saving change).

--------------34BBE85133F6C4488F32F2EB
Content-Type: text/x-patch; charset=UTF-8;
 name="0001-diff-fix-timezone-bug-on-Solaris.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="0001-diff-fix-timezone-bug-on-Solaris.patch"

=46rom 8318c748a9aae3d343f10ddb9f4018c85618a978 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 15 Oct 2021 18:53:55 -0700
Subject: [PATCH] diff: fix timezone bug on Solaris

Problem reported by Vladimir Marek (bug#51228).
* NEWS: Mention this.
* src/context.c (print_context_label): Pass localtz to nstrftime,
instead of always passing 0.
* src/diff.c (main) [!HAVE_TM_GMTOFF]:
Initialize localtz if time_format uses %z.
* src/diff.h (localtz): New decl.
* tests/Makefile.am (TESTS): Add timezone.
* tests/timezone: New test.
---
 NEWS              |  6 ++++++
 src/context.c     |  2 +-
 src/diff.c        |  3 +++
 src/diff.h        |  7 +++++++
 tests/Makefile.am |  1 +
 tests/timezone    | 14 ++++++++++++++
 6 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100755 tests/timezone

diff --git a/NEWS b/NEWS
index 3de0810..105a7df 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU diffutils NEWS                                    -*=
- outline -*-
=20
 * Noteworthy changes in release ?.? (????-??-??) [?]
=20
+** Bug fixes
+
+  diff -c and -u no longer output incorrect timezones in headers
+  on platforms like Solaris where struct tm lacks tm_gmtoff.
+  [bug#51228 introduced in 3.4]
+
=20
 * Noteworthy changes in release 3.8 (2021-08-01) [stable]
=20
diff --git a/src/context.c b/src/context.c
index b3cfa7d..adcfdb3 100644
--- a/src/context.c
+++ b/src/context.c
@@ -52,7 +52,7 @@ print_context_label (char const *mark,
                     INT_STRLEN_BOUND (time_t) + 11)];
       struct tm const *tm =3D localtime (&inf->stat.st_mtime);
       int nsec =3D get_stat_mtime_ns (&inf->stat);
-      if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec)=
))
+      if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, localtz,=
 nsec)))
         {
           verify (TYPE_IS_INTEGER (time_t));
           if (LONG_MIN <=3D TYPE_MINIMUM (time_t)
diff --git a/src/diff.c b/src/diff.c
index fedc7df..0961afb 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -728,6 +728,9 @@ main (int argc, char **argv)
       time_format =3D "%Y-%m-%d %H:%M:%S.%N %z";
 #else
       time_format =3D "%Y-%m-%d %H:%M:%S %z";
+#endif
+#if !HAVE_TM_GMTOFF
+      localtz =3D tzalloc (getenv ("TZ"));
 #endif
     }
   else
diff --git a/src/diff.h b/src/diff.h
index d65c1da..34caa37 100644
--- a/src/diff.h
+++ b/src/diff.h
@@ -155,6 +155,13 @@ XTERN bool ignore_file_name_case;
    (--no-dereference).  */
 XTERN bool no_dereference_symlinks;
=20
+/* Local timezone for 'c' output headers, if needed.  */
+#if HAVE_TM_GMTOFF
+# define localtz 0 /* Placeholder since localtz is never needed.  */
+#else
+XTERN timezone_t localtz;
+#endif
+
 /* File labels for '-c' output headers (--label).  */
 XTERN char *file_label[2];
=20
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 83a7c9d..d98df82 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -22,6 +22,7 @@ TESTS =3D \
   strcoll-0-names \
   filename-quoting \
   strip-trailing-cr \
+  timezone \
   colors
=20
 XFAIL_TESTS =3D large-subopt
diff --git a/tests/timezone b/tests/timezone
new file mode 100755
index 0000000..52b9e18
--- /dev/null
+++ b/tests/timezone
@@ -0,0 +1,14 @@
+#!/bin/sh
+# In diff 3.4 through 3.8, this would output the wrong timezone on Solar=
is.
+
+. "${srcdir=3D.}/init.sh"; path_prepend_ ../src
+
+fail=3D0
+
+echo a >a || fail=3D1
+case $(LC_ALL=3DC TZ=3DEST5 diff -u /dev/null a) in
+  *' -0500'*) ;;
+  *) fail=3D1 ;;
+esac
+
+Exit $fail
--=20
2.30.2


--------------34BBE85133F6C4488F32F2EB--




From MAILER-DAEMON Mon Oct 18 10:29:11 2021
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1mcTdV-0002q0-JG
	for mharc-bug-diffutils@gnu.org; Mon, 18 Oct 2021 10:29:10 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35892)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1mcTdQ-0002oV-3b
 for bug-diffutils@gnu.org; Mon, 18 Oct 2021 10:29:06 -0400
Received: from debbugs.gnu.org ([209.51.188.43]:36680)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1mcTdN-000069-TY
 for bug-diffutils@gnu.org; Mon, 18 Oct 2021 10:29:02 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1mcTdN-0004iK-OU
 for bug-diffutils@gnu.org; Mon, 18 Oct 2021 10:29:01 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Vladimir Marek <Vladimir.Marek@oracle.com>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-diffutils@gnu.org
Resent-Date: Mon, 18 Oct 2021 14:29:01 +0000
Resent-Message-ID: <handler.51228.B51228.163456731218084@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 51228
X-GNU-PR-Package: diffutils
X-GNU-PR-Keywords: 
To: 51228@debbugs.gnu.org
Received: via spool by 51228-submit@debbugs.gnu.org id=B51228.163456731218084
 (code B ref 51228); Mon, 18 Oct 2021 14:29:01 +0000
Received: (at 51228) by debbugs.gnu.org; 18 Oct 2021 14:28:32 +0000
Received: from localhost ([127.0.0.1]:48226 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1mcTcu-0004hb-EM
 for submit@debbugs.gnu.org; Mon, 18 Oct 2021 10:28:32 -0400
Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:12240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vladimir.marek@oracle.com>) id 1mcTcp-0004hN-GZ
 for 51228@debbugs.gnu.org; Mon, 18 Oct 2021 10:28:30 -0400
Received: from pps.filterd (m0246630.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19IES3Ni018039
 for <51228@debbugs.gnu.org>; Mon, 18 Oct 2021 14:28:25 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=date : from : to :
 subject : message-id : references : content-type : in-reply-to :
 mime-version; s=corp-2021-07-09;
 bh=/VTn9zVwOB4/zFVIUfpBBBGntjdhYkAWBv4Qe5sTWj8=;
 b=fYHHCa4PrU0HMp4wQKV+iw4Hb4EVd8alA6+YYJmSeZUrqYbHEWfaiYnl2h1vL4BaH03Y
 or+0weUcp78ER+mO2j6CG5Ly+Fo9vc1qNDWccmQSo37Xd757DuT/kbAj++wGwUA6U79H
 mFDUnt+kW07SgoaQm69WlsGDbqVhBmC0b/fL1MR/GaWuWJt04yS0M+Z14zwmqR6OXVGO
 hD1Amzy75UitlZqP9lwH4cCvvpA3FRnXQisNeHu93JDEcBFaN/CIj3xSzmuCNuVGy/sg
 GDUJWzBHKKwUj/dhL8PD6AX/Cf8LeKE/82IgMnc7kr7RZrznjS60DXZZRgb/jx4hfkPC cQ== 
Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71])
 by mx0b-00069f02.pphosted.com with ESMTP id 3brjxn4587-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <51228@debbugs.gnu.org>; Mon, 18 Oct 2021 14:28:24 +0000
Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1])
 by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 19IEIrPd170431
 for <51228@debbugs.gnu.org>; Mon, 18 Oct 2021 14:28:18 GMT
Received: from nam11-dm6-obe.outbound.protection.outlook.com
 (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174])
 by aserp3030.oracle.com with ESMTP id 3bqmsd5rrv-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)
 for <51228@debbugs.gnu.org>; Mon, 18 Oct 2021 14:28:18 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=jjtMqrF0AED4v8hwuRkymp/XS1EE4BN0SwK+CQOk1RY9+/BBvO18cG+WdvdDj2nP+klNtxVfaX2CIMteuFJP06ojhqOF+MO2SNgp2NEPu8aaEYHrcKttAqSBL6ZdFr+7iPBYRXKdQvLVqYj/Xu8yWOAE5YaQCkDZ3yAMFoFbHNihPUIemC4oOEyKcnmvYREFtK5wvxLW2d9q6wPAyCgYpIGAraaapdA9Mfq8V9ajJaPoz+tCHJSKE2yqqfMAmoSWrAV2s314zriFK30o4NVnnqyfsqxqBCOsH6koksbXJgMcXsn5LNQ9oYLIV9HrrBPXULyWUa/IX1udIjOluzix6Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=/VTn9zVwOB4/zFVIUfpBBBGntjdhYkAWBv4Qe5sTWj8=;
 b=JYdre2J9ofe7ia8C6VhGQxy+lrXyq4ev70UNKV/tlo888d7vbuEY7+9OrTRg9kvMuMrn51zNKdQWxSKJCHFqWBUxxXAuDoXBw8T1FyrfGo1z/C8NvVJx56uTMEZTWLtDClvvl/jBYDpv03w583RhvKRnqgUx2S016Gdt4gArmzGR7V+Huy34w3FEIi8jPezyPzfQAj3ld79QpyC7gHBkeotPgFqniuwT00El37KaaCWOm14jkmGt6A9ZwnkKnUk0QAHMWTG9LY/BRYPjovHJR2Z7oonRzP16C7wROHL6F7MWHW5jZFx4amtUAMyQeOvfLHnvK1mfI1uYDIURU0UznQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=/VTn9zVwOB4/zFVIUfpBBBGntjdhYkAWBv4Qe5sTWj8=;
 b=tYFReGFGF8oAtO5/llYVFx7rzn9LlMAJP0O+wAKeiHzePRcVkGvcsf9174p331Z/zGy6/lkiT8ALJWcCZn/LAp5YSaxtvKuKD3Z/TbxZh8V3qK8ixJmXnHZjCJQ/bdbx1pFe7CeSeDg+z2lQGLtxGknedtcV92KNNChbjcQGeqU=
Authentication-Results: debbugs.gnu.org; dkim=none (message not signed)
 header.d=none; debbugs.gnu.org; dmarc=none action=none header.from=oracle.com; 
Received: from BY5PR10MB3780.namprd10.prod.outlook.com (2603:10b6:a03:1ff::14)
 by BYAPR10MB3336.namprd10.prod.outlook.com (2603:10b6:a03:158::33)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Mon, 18 Oct
 2021 14:28:16 +0000
Received: from BY5PR10MB3780.namprd10.prod.outlook.com
 ([fe80::25b5:a4e0:d5bf:584a]) by BY5PR10MB3780.namprd10.prod.outlook.com
 ([fe80::25b5:a4e0:d5bf:584a%5]) with mapi id 15.20.4608.018; Mon, 18 Oct 2021
 14:28:16 +0000
Date: Mon, 18 Oct 2021 16:28:10 +0200
From: Vladimir Marek <Vladimir.Marek@oracle.com>
Message-ID: <20211018142810.rvzcaksvndjrttsf@virtual.cz.oracle.com>
References: <c4c165b3-d748-ee43-4ac6-a0c6a3f9c785@cs.ucla.edu>
 <20211015135517.sez2ysh2jogaotl3@virtual.cz.oracle.com>
 <handler.51228.D51228.163434994816756.notifdone@debbugs.gnu.org>
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <handler.51228.D51228.163434994816756.notifdone@debbugs.gnu.org>
X-ClientProxiedBy: LO2P265CA0287.GBRP265.PROD.OUTLOOK.COM
 (2603:10a6:600:a1::35) To BY5PR10MB3780.namprd10.prod.outlook.com
 (2603:10b6:a03:1ff::14)
MIME-Version: 1.0
Received: from virtual.cz.oracle.com (138.3.204.11) by
 LO2P265CA0287.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::35) with Microsoft
 SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.20.4608.15 via Frontend Transport; Mon, 18 Oct 2021 14:28:15 +0000
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: ed5bff9b-4112-4ec0-b281-08d99243860b
X-MS-TrafficTypeDiagnostic: BYAPR10MB3336:
X-MS-Exchange-Transport-Forked: True
X-Microsoft-Antispam-PRVS: <BYAPR10MB33360C95AFED4F51D10C2AD7FDBC9@BYAPR10MB3336.namprd10.prod.outlook.com>
X-MS-Oob-TLC-OOBClassifiers: OLM:7691;
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: Q0lx1LJ1X8RdJtv+GAQrJX/a1ILJ5FZg/pHYzjJN3bY+VXOxj0n5tUpgexlQmnQPVUUgYOrkk4ozAniHvC0kY/tTNWilUFsUW6IiE268saMSNhqdDLYbCk/ypJugZai7LxRYTiJuAj44XEUjF09T1N+z5ghbttWEHwIVl4JA0WN1srRqCi6uPgFkrvJGznfFyKjoAUbV+nP6YpUNB99LEbyzqeY2x4/wOA4UxyhZIU52Qc3bAgh/0ttziVcWhsaGky6mtY3J7buY6Ci+Y0X+OF6Am3sCfp/ybFC702zUT9VPFewtqits6pYYseFBdJxDtUOJ5e2mw5kqsERBXud8qXQ/UquvX50mTvkcCCVuQ5IXO7oARVDDooKj/hbvIW8AcHzv1ZotRgrbRUF6P4PmB3N+s5EHJSQIHcDNy1hXKEyhYa1P+eMUCcg2zoTGtkpT82M7PuyvXUS0vgLAG1lVIkasSE6YmGDHNcW3vcrCfxPFFA5cGjd3ru8w5SdXm+Vq3ZUAkpHj7FGvNruEtyrfWmcbGDwdIgGdxFIidVhFLiWxvoMvttou/V2pBMUEAfH//C9Zst3TCLyphtvz1iDgShBwzREm9q4zDT+mCyBaTB3TK8BLR6gzetwr0WwoSkN7OCnxBTBNnjAVsmHOynZ2acFir5bOibMn1Ht95Om1MAf7oZqTTplXimJZBmM716ib5acUSISyC1oWicq7kZOn6g==
X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; 
 IPV:NLI; SFV:NSPM;
 H:BY5PR10MB3780.namprd10.prod.outlook.com; PTR:; CAT:NONE; 
 SFS:(366004)(6916009)(2906002)(3716004)(66946007)(66556008)(4744005)(5660300002)(7696005)(316002)(38100700002)(8936002)(86362001)(6666004)(38350700002)(26005)(55016002)(956004)(508600001)(8676002)(1076003)(186003)(52116002)(66476007);
 DIR:OUT; SFP:1101; 
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: dswKs5Z8zb637euuaXPXz6lwCFNtJUna4nUh9K4ldo9eHqQdWerrYl47bDfszYVYRslj5nNSoL+hJGu5N5SvRDgEfdZn4r0K+ETanoRq6pnKYj25tcf9goGakpnO9vBbp0vkjmjzjcfZFTm/fp7pst2XTsWxP3J2K31FqYhxua222uRgFeQw+B9vka2xcQ3XxGVd6p14rDmBKH0993C/EzHIe5sX6eytmEs/1kE5nUXDMcp96biTFiVJs6NDvcF6gH/j7v1tD7yXgC3GJkBpwsjNeP0dMrgOGTwTNN6ZYypRPwjtPZpRr9w3Ww78Ia8uXbar5wPX/4L58jII+gyEALwbNcicftu/amDsmfYFb459PTL/EE+XYxnnXvl6BSECiqlbBtDbVfkNXsR3Pak1P7VwenzZvJkenJY0at+mQT1j/AKqH+VX3KvTwxiWOuiXjtdwQEGL5lGQ6iu/aILGCA+N0ULYrZhREPptR9pZOcMoAdi9aQ5y8xnCgXwDGKoiv9bToAADP+yrXbr81Fz6GH5a1ngB+Y1J8MpPgyIAy8oqNBaFJrNXb1s8JiVv/Mq+p/0on7Utn+43FrVsga3GB73pm2IDGBA8UAMpEhIjzXCcr0QUwLQBCvG+Ey08fBw5gXbhLmIpOIJsrzJU3mZC9q58enqU7HYSmfKTZeXBpVjZx9m/3wxNG+o3XqMMT5R168GorpyMX/F16uk6Oo9l/ylXXSBVPtLCw8EXK1uoVY1eYK7W+qhot5+9WaQg2Rw2ASnfO93Z5pxwvr7xOgqWmGmi0Yuz22WuBqEFoxyedZDrNZ/3m94j5gPN3PWQ0g3ebmgBhwR6OMgb2v3wnBtQKKt2hnKGUYvkMppm5VZHKdHbX7dz2bLmn+zEmZ5YXL4HiDq45Qk+MXAj3CUukerlqFOMoBDlUSLKuqMg07cyizGsVXfG0o7/GJ4l4o9eDV149LUW6EPx6QoMQogdUXSDPqhs3nNLK3bdjmu3yb8IrY1z5StgajCN3hj79AkIM9B8sJPHhhEtHNkBbrEZK0eJFryKPtD8yVItURi5iwVK0YOl4S31azR426I0GDDPKGJ0oUKxdm5AlyAEAsMtTVhrM1CGWr1L8ICyWEOSk5/+MFBCHjKNdhuZoSxOlc46hC7fjPmOq1Fz72J65KwnjEa1DCJv/bS9uSLztTWhxEl4p7yz8nBqxSvZHNjLMfzs1JvS9mpBd8Fz0LNQ+PPH9EAIArT26KMcEVLw+vYWJSqZMlfeEipiIZVbVm1CPyrHUE65BVTmgUPo9yMiyRZrjYiKH61wUYDmh/G8YmiK4LIZ6c1ApZDwRTcZjAw6g9/S3yD0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ed5bff9b-4112-4ec0-b281-08d99243860b
X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB3780.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2021 14:28:16.1382 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: QbWVD+x6DEvA1fvAe3lUcirSoFMU/cjqZ/AybRzQXOaZGS4LmYa6gEDuUEJwpFhbXqtSsnLzp8+np8ooUDVWbHg6CZHc9VxUTbcd8/k/aJQ=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3336
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10141
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 adultscore=0 malwarescore=0
 phishscore=0 mlxlogscore=927 bulkscore=0 suspectscore=0 mlxscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001
 definitions=main-2110180089
X-Proofpoint-GUID: 96QUklkKlwMVQ8fZXSiL2tm5fVoWN_Xq
X-Proofpoint-ORIG-GUID: 96QUklkKlwMVQ8fZXSiL2tm5fVoWN_Xq
X-Spam-Score: -0.7 (/)
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.7 (-)
Subject: [bug-diffutils] bug#51228: [External] : bug#51228: closed (Re:
 bug#51228: Incorrect timezone in unified diff on Solaris?)
X-BeenThere: bug-diffutils@gnu.org
List-Id: "All diffutils discussion." <bug-diffutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-diffutils>,
 <mailto:bug-diffutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-diffutils>
List-Post: <mailto:bug-diffutils@gnu.org>
List-Help: <mailto:bug-diffutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-diffutils>,
 <mailto:bug-diffutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Oct 2021 14:29:06 -0000

[...]

> I installed the attached patch into diffutils. Please give it a try, as the
> patch you sent mishandles the case when today's UT offset differs from the
> UT offset in effect when the file was last modified (e.g., due to a
> daylight-saving change).

Your patch works fine for me, I'll gladly use it instead of my change.

Thank you
-- 
	Vlad




