From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Newsgroups: gmane.emacs.bugs Subject: bug#43759: Emacs Calc date conversion Date: Fri, 2 Oct 2020 20:13:37 +0000 Message-ID: References: <87o8lkwvvj.fsf@gnus.org>,<0BC1BBB7-6524-4DA2-90D7-37807994E388@acm.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_000_PR3PR06MB6843E8D4268E976E4367A40A84310PR3PR06MB6843eurp_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7674"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "43759@debbugs.gnu.org" <43759@debbugs.gnu.org> To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 02 22:14:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kORRZ-0001ta-7S for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Oct 2020 22:14:17 +0200 Original-Received: from localhost ([::1]:35014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kORRY-0006hI-68 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Oct 2020 16:14:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kORRO-0006fZ-1h for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2020 16:14:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kORRK-0004RV-Lp for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2020 16:14:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kORRK-0004ug-Fw for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2020 16:14:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Oct 2020 20:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43759 X-GNU-PR-Package: emacs Original-Received: via spool by 43759-submit@debbugs.gnu.org id=B43759.160166962918861 (code B ref 43759); Fri, 02 Oct 2020 20:14:02 +0000 Original-Received: (at 43759) by debbugs.gnu.org; 2 Oct 2020 20:13:49 +0000 Original-Received: from localhost ([127.0.0.1]:42641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kORR7-0004u8-Iv for submit@debbugs.gnu.org; Fri, 02 Oct 2020 16:13:49 -0400 Original-Received: from mail-oln040092073068.outbound.protection.outlook.com ([40.92.73.68]:45473 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kORR4-0004tt-2P for 43759@debbugs.gnu.org; Fri, 02 Oct 2020 16:13:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c8NkaI1zuqY4k4racS3SWN22K/4zVEIDGOVpxlrAjbgIVrZ+XQCqUVPVk9bcNAqTchigx5pcFcieVDzTIkaedHonCEkYF/86DANci0IIOK2BtUXYm+oYoEH4CKmOWqr/ovrx7xs25eq3BbjVWOUARGXGdC7DSu6whsYhqxzNWx8K3OL8xi0oA1v8RQkiVVYNFeo/uJ4ACRbOg5TtMI883fcqQnCGTZyHD7dpobXmeLVpGf3PQ/vHeMaIKGg7W25/zyuCxIHRSeh4mJXdeO5sLp2OruBXrv5VVgBxefprDUlts7EAExdzN5z8dfRqDzqSjk7SVvD62UeDKti1q66DmA== 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-SenderADCheck; bh=NNZZdtFtkX95wnZac8kPaWJNMTjAQWWXbVp41eeNBlY=; b=WTOU5gUDYibaUlj7KNa6EvtxtNDsC7oxARoriY6NTT11vqhhqdFyJ+xcBGF4M15KiyLjgg7zV5WUzL4d/tnPM810EdApj4BGOWlPynPMP0FXdA/akxzjANQYTGcGMqDT5iyLrdtcvdRKUDry48lCssFXaT+FA8kNL05FXCdLUpwCNNdokrNFGLCPGtqgTZsprw8ia42ucXCgY0Ieet/crMdE1cCpCqMVjnRzgvMTPCw4/Q5sjIsJMjKTW4JNTxbgi46eGoJoJVVVt6oiLX6fsh3JrusL97H/zA2ylsv5nSB1FE90GcRITvlFKUk7LtJ+ZI3bTZ8g5aTZz18oD3wNag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Original-Received: from DB3EUR04FT022.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::4e) by DB3EUR04HT089.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0c::126) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34; Fri, 2 Oct 2020 20:13:37 +0000 Original-Received: from PR3PR06MB6843.eurprd06.prod.outlook.com (2a01:111:e400:7e0c::41) by DB3EUR04FT022.mail.protection.outlook.com (2a01:111:e400:7e0c::285) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34 via Frontend Transport; Fri, 2 Oct 2020 20:13:37 +0000 Original-Received: from PR3PR06MB6843.eurprd06.prod.outlook.com ([fe80::491c:11b9:aa7d:c079]) by PR3PR06MB6843.eurprd06.prod.outlook.com ([fe80::491c:11b9:aa7d:c079%6]) with mapi id 15.20.3412.022; Fri, 2 Oct 2020 20:13:37 +0000 Thread-Topic: bug#43759: Emacs Calc date conversion Thread-Index: AQHWmKnJXDpGcmF7rUu7DtH0kZ00k6mEXaWagAA0qICAAC1BKg== In-Reply-To: <0BC1BBB7-6524-4DA2-90D7-37807994E388@acm.org> Accept-Language: fr-FR, en-US Content-Language: fr-FR x-incomingtopheadermarker: OriginalChecksum:6F96784B11FE05E70A4D858FAD94960BFDE2C48021876B26C3F641D0BFF90980; UpperCasedChecksum:5C0B9F0EF51E83BE8CF2DD40B53765E489BC66167815BF90F0A4656D7EA4844F; SizeAsReceived:7083; Count:45 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [IHk88m4uk0LjsSmJIy4b+/G/fs31KyqD] x-ms-publictraffictype: Email x-incomingheadercount: 45 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 739a71b9-6482-455e-7249-08d8670fa5a3 x-ms-traffictypediagnostic: DB3EUR04HT089: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oJ23WU1gt2wMvcaHPOlZAeCIpXXgKsK8Jxt/JkxCtpvbUgYW9si3da2QFQri1DhiIWgAvMjSyx1mshmxyAOTHxSySP+cfh4VI7EU8kelbB39/z23TWi8V7F9PmZwoV4DQYMNB9b7+eVf/xAXDJ50JFH2cmSXQS3feyuwsI2W9kPpXway43vOfgghayBfxXvwIAlMln/teNZBDHugwkiJIA== x-ms-exchange-antispam-messagedata: M5tP3VwPvO54k5fcq556GEMB+zUjg8zanKQAMlSJbndIXRZdKpKwkmRbUwq9VCR9+OpFWVOkFyjZ+9jB3WnmzVQVxoSQf4LPvzzlr0naomqGuQQkwwFEE1FKPPXgMOJ/QZkICV4MrS1I+GsspT+Scw== x-ms-exchange-transport-forked: True X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DB3EUR04FT022.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 739a71b9-6482-455e-7249-08d8670fa5a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2020 20:13:37.3435 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3EUR04HT089 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189678 Archived-At: --_000_PR3PR06MB6843E8D4268E976E4367A40A84310PR3PR06MB6843eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Definitely, I applied the patch manually, and it fixed the issue. VBR, V. ________________________________ De : Mattias Engdeg=E5rd Envoy=E9 : vendredi 2 octobre 2020 19:31 =C0 : Lars Ingebrigtsen Cc : Vincent Bela=EFche ; 43759@debbugs.gnu.org <43= 759@debbugs.gnu.org> Objet : Re: bug#43759: Emacs Calc date conversion 2 okt. 2020 kl. 16.22 skrev Lars Ingebrigtsen : > This is another off-by-one-day bug, though, so perhaps it's related to > the same change from a few years ago that changed day zero? Actually this error is unrelated. It has been there since Calc was added to= the Emacs tree in 2001: the number of days from the Calc epoch to start of= Unix time was incorrectly given as 719164 but the correct number was 71916= 2 before the change in Calc epoch in 2012, and since then it should be 7191= 63. The "t U" command was fixed in 2015 (e368697ce36) along with the documentat= ion. The attached patch fixes the remaining uses of the wrong constant, in = the date parsing and formatting code. Vincent, is this patch helpful? --_000_PR3PR06MB6843E8D4268E976E4367A40A84310PR3PR06MB6843eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Definitely, I applied the patch manually, and it fixed the issue.

VBR,
  V.

De : Mattias Engdeg=E5rd &l= t;mattiase@acm.org>
Envoy=E9 : vendredi 2 octobre 2020 19:31
=C0 : Lars Ingebrigtsen <larsi@gnus.org>
Cc : Vincent Bela=EFche <vincent.b.1@hotmail.fr>; 43759@d= ebbugs.gnu.org <43759@debbugs.gnu.org>
Objet : Re: bug#43759: Emacs Calc date conversion
 
2 okt. 2020 kl. 16.22 skrev Lars Ingebrigtsen <= larsi@gnus.org>:

> This is another off-by-one-day bug, though, so perhaps it's related to=
> the same change from a few years ago that changed day zero?

Actually this error is unrelated. It has been there since Calc was added to= the Emacs tree in 2001: the number of days from the Calc epoch to start of= Unix time was incorrectly given as 719164 but the correct number was 71916= 2 before the change in Calc epoch in 2012, and since then it should be 719163.

The "t U" command was fixed in 2015 (e368697ce36) along with the = documentation. The attached patch fixes the remaining uses of the wrong con= stant, in the date parsing and formatting code. Vincent, is this patch help= ful?

--_000_PR3PR06MB6843E8D4268E976E4367A40A84310PR3PR06MB6843eurp_--