From unknown Sun Jun 22 03:58:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43759: Emacs Calc date conversion 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 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43759 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 43759@debbugs.gnu.org X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.160163695214169 (code B ref -1); Fri, 02 Oct 2020 11:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Oct 2020 11:09:12 +0000 Received: from localhost ([127.0.0.1]:39477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOIw3-0003gT-Ey for submit@debbugs.gnu.org; Fri, 02 Oct 2020 07:09:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:52332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOIvz-0003gJ-Eu for submit@debbugs.gnu.org; Fri, 02 Oct 2020 07:09:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOIvz-0005Al-9p for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2020 07:09:07 -0400 Received: from mail-am6eur05olkn2047.outbound.protection.outlook.com ([40.92.91.47]:5024 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOIvx-0004He-K2 for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2020 07:09:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GQM9oHXOYS6TccmmVJhy6OEPFZ72CF9TTe/LNcc4K73+XG2JJtjdtwF0TYfnIhZcfOfeHD1JtN8HUyx5hA2//jQegB21b6SFUTS/d8GEbteSF8FkdVxvLo2vPvQkugOe58ZWSTqiAhxn6hIy57eskSLKOkNRQrI+asWQYusBGoD08tK9dDt4LLu2E6NZ8bNHbuW0z37E8k2zA3I97y35z++BQHFjYDwe8nZDKHQxRAQ3/O9/nn6U+HHRMDdAUeX8yqBB8zbyNVaQGw+aLsbkAd6isjzydPTBGrRxVeFWknlgvyvg5fHSYgaTKdTVzZ8GL8+SPqrkokFHV65FzbhV3w== 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=GOYdlXXWN7DFc+NbFVrqqAucZ9FpKEbQ9Y21ywuTP+Y=; b=T2hfB/p09IVgEdxyk78OIAQbJcCnm5oo4YfdB3DKj3JA444QMd9Q8v+Wsv+Ca4M6tmCANwz2PjeO03bvqYBTnWe9CjCrE5VKZbkUGNXUffdQKNERAMKonjRn8U/4EOU/i4LbF1cvuUlIb+mnl2kQYM5xnim28uyKHgvToBDjKON0O5XwuPpFz0tTX/bP9oj1Bay20GY5uIEp85dauPRdwWcs4VNCSBIJHv9GqoiTSk3uMzBWYXTz10J43alI1fHL1fps9FzV4B36adh1wQxDF//tTC8NNoZDN0ybkrhzYBTvQYid6Lp7GAQQ38FoYWuWuzhcZAgh+Rg1J3tIEshQew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB8EUR05FT004.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::40) by DB8EUR05HT171.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::274) 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 10:53:59 +0000 Received: from PR3PR06MB6843.eurprd06.prod.outlook.com (2a01:111:e400:fc0f::4f) by DB8EUR05FT004.mail.protection.outlook.com (2a01:111:e400:fc0f::106) 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 10:53:59 +0000 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 10:53:59 +0000 From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Thread-Topic: Emacs Calc date conversion Thread-Index: AQHWmKnJXDpGcmF7rUu7DtH0kZ00kw== Date: Fri, 2 Oct 2020 10:53:59 +0000 Message-ID: Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:5BAF40ACE1AB104565003F21842476C81F91D780974841F12D7EC24D2C3A1C57; UpperCasedChecksum:28E2FFB4BD43DD0C8DF22DA54A4031A349B4AE8663D4F7842A2642951D181BA5; SizeAsReceived:6637; Count:41 x-tmn: [ohWSjo+5R0TMlaO4gvFp4TgJeIoT+GY/] x-ms-publictraffictype: Email x-incomingheadercount: 41 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 84ab0c79-2657-4172-ecb6-08d866c177b3 x-ms-traffictypediagnostic: DB8EUR05HT171: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WCIuGCKq6i4b2ihY399xdKYSd3G0Mq8p+5t8rxo/5/CQr8cP3lFmtaev6goF37xnyGBkDnjWc1Z5UiLCcpEANo2g9SOZPI29qKtT5kiJ8oMKb9rTF4/E+spev9iKoI60EAB/BhKClXmWPPFjX9iSbL9squUVLmGV1xtwSgbHat1/oXxmxIvTBYRtJ4POpvseTVY171p3o4V+8+2zOwC//A== x-ms-exchange-antispam-messagedata: IplVAun2A0ZzG8gPMqyB7KeenCABR54PlMnfCiuOksPcrjb7RcdRuQEm98Zto4Khi803zzS7R6vFc0i83LC/rRcAqzLqM9DDvfZRciiEkHWhSgA1rUqx0KDMZCzgNdlSJ/++dduUs0777TkkXFEgMQ== x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT004.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 84ab0c79-2657-4172-ecb6-08d866c177b3 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2020 10:53:59.4726 (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: DB8EUR05HT171 Received-SPF: pass client-ip=40.92.91.47; envelope-from=vincent.b.1@hotmail.fr; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/02 07:09:02 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable My Emacs version is GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, = NS appkit-1894.60 Version 10.15.6 (Build 19G73)) of 2020-07-29 I do the following exp=E9riment under Emacs CC ;; Set date format as Unix dd U RET ;; Enter 1991-01-09T06:00 in Unix format, cf. date -d '1991-01-09T06:00+00'= '+%s' ' <663400800> RET ;; Set format as ISO dd YYYY-MM-DD HH:mm:SS RET Then the display is <1991-01-10 06:00>, but I expected the 9th and not the = 10th of January. Vincent. --_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
My Emacs version is GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.= 6.0, NS appkit-1894.60 Version 10.15.6 (Build 19G73)) of 2020-07-29

I do the following exp=E9riment under Emacs CC

;; Set date format as Unix
dd U RET
;; Enter 1991-01-09T06:00 in Unix format, cf. date -d '1991-01-09T06:00+00'= '+%s'
' <663400800> RET
;; Set format as ISO
dd YYYY-MM-DD HH:mm:SS RET

Then the display is <1991-01-10 06:00>, but I expected the 9th a= nd not the 10th of January.

  Vincent.
--_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_-- From unknown Sun Jun 22 03:58:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43759: Emacs Calc date conversion Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Oct 2020 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43759 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Vincent =?UTF-8?Q?Bela=C3=AFche?= Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 43759@debbugs.gnu.org Received: via spool by 43759-submit@debbugs.gnu.org id=B43759.160164856010830 (code B ref 43759); Fri, 02 Oct 2020 14:23:01 +0000 Received: (at 43759) by debbugs.gnu.org; 2 Oct 2020 14:22:40 +0000 Received: from localhost ([127.0.0.1]:42221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOLxH-0002oc-UD for submit@debbugs.gnu.org; Fri, 02 Oct 2020 10:22:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOLxG-0002oP-Eo for 43759@debbugs.gnu.org; Fri, 02 Oct 2020 10:22:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=yIOII9IVHXrHuZVU2O1PHHrizoyxbRYLHzXPi6WEVpE=; b=RD41zvM4h5t0/LkyTnbLUn7QdH tvbqs5Nxbf7IA7sGMwydBVZS1nXxor5W78KcP9joolb7n6eWneNmAXJtrFpI9UdeQopo618+1GRnZ 6QyC1811KNPQiwWZ3HQLP651VSxCdRUCKMMgMwYCmOFqkWBv6ncppgn45l7cna9r6w74=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kOLx4-0004Kt-3K; Fri, 02 Oct 2020 16:22:31 +0200 From: Lars Ingebrigtsen References: X-Now-Playing: Jane Siberry's _When I Was A Boy_: "Sail Across The Water" Date: Fri, 02 Oct 2020 16:22:24 +0200 In-Reply-To: ("Vincent =?UTF-8?Q?Bela=C3=AFche?="'s message of "Fri, 2 Oct 2020 10:53:59 +0000") Message-ID: <87o8lkwvvj.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Vincent =?UTF-8?Q?Bela=C3=AFche?= writes: > I do the following =?UTF-8?Q?exp=C3=A9riment?= under Emacs CC > > ;; Set date format as Unix > dd U RET > ;; Enter 1991-01-09T06:00 in Unix format, cf. date -d '1991-01-09T06:00+00' > '+%s' > ' <663400800> RET > ;; [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Vincent Bela=C3=AFche writes: > I do the following exp=C3=A9riment under Emacs CC > > ;; Set date format as Unix > dd U RET > ;; Enter 1991-01-09T06:00 in Unix format, cf. date -d '1991-01-09T06:00+0= 0' > '+%s' > ' <663400800> RET > ;; Set format as ISO > dd YYYY-MM-DD HH:mm:SS RET > > Then the display is <1991-01-10 06:00>, but I expected the 9th and not > the 10th of January. I wondered whether this somehow had also been fixed by Mattias' recent calc change to business days, but it hasn't -- I'm able to reproduce it with the current trunk. 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? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 22 03:58:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43759: Emacs Calc date conversion Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Oct 2020 17:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43759 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: Vincent =?UTF-8?Q?Bela=C3=AFche?= , 43759@debbugs.gnu.org Received: via spool by 43759-submit@debbugs.gnu.org id=B43759.16016598803889 (code B ref 43759); Fri, 02 Oct 2020 17:32:03 +0000 Received: (at 43759) by debbugs.gnu.org; 2 Oct 2020 17:31:20 +0000 Received: from localhost ([127.0.0.1]:42434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOOtr-00010f-M0 for submit@debbugs.gnu.org; Fri, 02 Oct 2020 13:31:19 -0400 Received: from mail228c50.megamailservers.eu ([91.136.10.238]:37148 helo=mail36c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOOtm-00010S-M0 for 43759@debbugs.gnu.org; Fri, 02 Oct 2020 13:31:18 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1601659872; bh=P89XEvq23EOZbPwgUgaA+aY9WeTf48XRpZVsVqkvAaI=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=T7+d0YdtRGPVXvwT+tosxJkxXvI6Pu39/8Tz2Kj6oJPjErKfnnsk2xfN260t2Srmk /YtjnClqxc1olfQesYKDPZzc1VtWyrchmOA5brlE3xNpErDwtg6zQh5nlOv2J0Tm/o 1hnPG8v2fmK1nq+dhIGnv6GhdbRcW2++dcU1F0+I= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail36c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 092HV9A0019882; Fri, 2 Oct 2020 17:31:11 +0000 From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Message-Id: <0BC1BBB7-6524-4DA2-90D7-37807994E388@acm.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_1AE4D75C-4940-4083-9699-C6077DFD5AF7" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Date: Fri, 2 Oct 2020 19:31:09 +0200 In-Reply-To: <87o8lkwvvj.fsf@gnus.org> References: <87o8lkwvvj.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F23.5F7763E0.0017, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=PeiBeRpd c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=M51BFTxLslgA:10 a=OocQHUDgAAAA:8 a=voEmyLi3Y555m_72J3MA:9 a=_J5qM0MSNCC8cjq0:21 a=92qlKjG8qyaVrUb6:21 a=CjuIK1q_8ugA:10 a=CADzTnd9ZfJ7LcTqauIA:9 a=B2y7HmGcmWMA:10 a=xUZTl98r3Qw_uB5NK3jt:22 X-Origin-Country: SE X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --Apple-Mail=_1AE4D75C-4940-4083-9699-C6077DFD5AF7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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 719162 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 = constant, in the date parsing and formatting code. Vincent, is this = patch helpful? --Apple-Mail=_1AE4D75C-4940-4083-9699-C6077DFD5AF7 Content-Disposition: attachment; filename=0001-Calc-fix-formatting-and-parsing-Unix-time-bug-43759.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Calc-fix-formatting-and-parsing-Unix-time-bug-43759.patch" Content-Transfer-Encoding: quoted-printable =46rom=20fb718a57123036e40cb8b3b813d734e590a104fa=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20= =0ADate:=20Fri,=202=20Oct=202020=2018:50:50=20+0200=0A= Subject:=20[PATCH]=20Calc:=20fix=20formatting=20and=20parsing=20Unix=20= time=20(bug#43759)=0AMIME-Version:=201.0=0AContent-Type:=20text/plain;=20= charset=3DUTF-8=0AContent-Transfer-Encoding:=208bit=0A=0AThe=20number=20= of=20days=20from=20epoch=20to=20Jan=201,=201970=20that=20was=20used=20in=20= parsing=0Aand=20formatting=20Unix=20time=20was=20incorrect.=20=20The=20= previous=20fix=0A(in=20e368697ce36)=20was=20incomplete.=0A=0AReported=20= by=20Vincent=20Bela=C3=AFche.=0A=0A*=20lisp/calc/calc-forms.el=20= (math-unix-epoch):=20New=20constant.=0A(math-format-date-part,=20= math-parse-standard-date,=20calcFunc-unixtime):=0AUse=20math-unix-epoch=20= instead=20of=20a=20constant=20that=20is=20sometimes=20wrong.=0A---=0A=20= lisp/calc/calc-forms.el=20=20=20=20=20=20|=2013=20++++++++----=0A=20= test/lisp/calc/calc-tests.el=20|=2041=20= ++++++++++++++++++++++++++++++++++++=0A=202=20files=20changed,=2050=20= insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/lisp/calc/calc-forms.el=20b/lisp/calc/calc-forms.el=0Aindex=20= 6d70126c09..a2f6696866=20100644=0A---=20a/lisp/calc/calc-forms.el=0A+++=20= b/lisp/calc/calc-forms.el=0A@@=20-709,6=20+709,10=20@@=20= math-julian-date-beginning-int=0A=20=20=20"The=20beginning=20of=20the=20= Julian=20date=20calendar,=0A=20as=20measured=20in=20the=20integer=20= number=20of=20days=20before=20December=2031,=201=20BC=20(Gregorian).")=0A= =20=0A+(defconst=20math-unix-epoch=20719163=0A+=20=20"The=20beginning=20= of=20Unix=20time:=20days=20from=20December=2031,=201=20BC=20(Gregorian)=0A= +to=20Jan=201,=201970=20AD.")=0A+=0A=20(defun=20math-format-date-part=20= (x)=0A=20=20=20(cond=20((stringp=20x)=0A=20=09=20x)=0A@@=20-730,7=20= +734,8=20@@=20math-format-date-part=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(math-floor=20= math-fd-date)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20math-julian-date-beginning-int)))=0A=20= =09((eq=20x=20'U)=0A-=09=20(math-format-number=20(nth=201=20= (math-date-parts=20math-fd-date=20719164))))=0A+=09=20= (math-format-number=20(nth=201=20(math-date-parts=20math-fd-date=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20math-unix-epoch))))=0A=20=20=20=20=20=20=20=20=20((memq=20x=20'(IYYY=20= Iww=20w))=0A=20=20=20=20=20=20=20=20=20=20(progn=0A=20=20=20=20=20=20=20=20= =20=20=20=20(or=20math-fd-iso-dt=0A@@=20-1173,7=20+1178,7=20@@=20= math-parse-standard-date=0A=20=09=09=20=20=20=20=20=20(setq=20num=20= (math-match-substring=20math-pd-str=200)=0A=20=09=09=09=20=20=20=20= math-pd-str=20(substring=20math-pd-str=20(match-end=200))=0A=20=09=09=09=20= =20=20=20num=20(math-date-to-dt=0A-=09=09=09=09=20(math-add=20719164=0A+=09= =09=09=09=20(math-add=20math-unix-epoch=0A=20=09=09=09=09=09=20=20=20= (math-div=20(math-read-number=20num)=0A=20=09=09=09=09=09=09=20=20=20=20=20= '(float=20864=202))))=0A=20=09=09=09=20=20=20=20hour=20(nth=203=20num)=0A= @@=20-1434,11=20+1439,11=20@@=20calcFunc-julian=0A=20(defun=20= calcFunc-unixtime=20(date=20&optional=20zone)=0A=20=20=20(if=20= (math-realp=20date)=0A=20=20=20=20=20=20=20(progn=0A-=09(setq=20date=20= (math-add=20719163=20(math-div=20date=20'(float=20864=202))))=0A+=09= (setq=20date=20(math-add=20math-unix-epoch=20(math-div=20date=20'(float=20= 864=202))))=0A=20=09(list=20'date=20(math-sub=20date=20(math-div=20= (calcFunc-tzone=20zone=20date)=0A=20=09=09=09=09=09=20=20=20=20=20= '(float=20864=202)))))=0A=20=20=20=20=20(if=20(eq=20(car=20date)=20= 'date)=0A-=09(math-add=20(nth=201=20(math-date-parts=20(nth=201=20date)=20= 719163))=0A+=09(math-add=20(nth=201=20(math-date-parts=20(nth=201=20= date)=20math-unix-epoch))=0A=20=09=09=20=20(calcFunc-tzone=20zone=20= date))=0A=20=20=20=20=20=20=20(math-reject-arg=20date=20'datep))))=0A=20=0A= diff=20--git=20a/test/lisp/calc/calc-tests.el=20= b/test/lisp/calc/calc-tests.el=0Aindex=204dded007f7..6eb0788052=20100644=0A= ---=20a/test/lisp/calc/calc-tests.el=0A+++=20= b/test/lisp/calc/calc-tests.el=0A@@=20-534,6=20+534,47=20@@=20= calc-business-days=0A=20=20=20=20=20=20=20)=0A=20=20=20))=0A=20=0A= +(ert-deftest=20calc-unix-date=20()=0A+=20=20(cl-flet=20((m=20(s)=20= (math-parse-date=20s)))=0A+=20=20=20=20;;=20calcFunc-unixtime=20(command=20= "t=20U")=20converts=20a=20date=20value=20to=20Unix=20time,=0A+=20=20=20=20= ;;=20and=20a=20number=20to=20a=20date.=0A+=20=20=20=20(should=20(equal=20= (m=20"1970-01-01")=20'(date=20719163)))=0A+=20=20=20=20(should=20(equal=20= (calcFunc-unixtime=20(m=20"1970-01-01")=200)=200))=0A+=20=20=20=20= (should=20(equal=20(calc-tests--calc-to-number=20(cadr=20= (calcFunc-unixtime=200=200)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(cadr=20(m=20"1970-01-01"))))=0A+=20=20=20=20(should=20= (equal=20(calcFunc-unixtime=20(m=20"2020-09-07")=200)=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(*=20(-=20(cadr=20(m=20= "2020-09-07"))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(cadr=20(m=20"1970-01-01")))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=2086400)))=0A+=20=20=20=20= (should=20(equal=20(calcFunc-unixtime=20(m=20"1991-01-09=2006:00")=200)=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20663400800))=0A= +=20=20=20=20(should=20(equal=20(calc-tests--calc-to-number=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cadr=20= (calcFunc-unixtime=20663400800=200)))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20726841.25))=0A+=0A+=20=20=20=20(let*=20= ((d-1970-01-01=20(m=20"1970-01-01"))=0A+=20=20=20=20=20=20=20=20=20=20=20= (d-2020-09-07=20(m=20"2020-09-07"))=0A+=20=20=20=20=20=20=20=20=20=20=20= (d-1991-01-09-0600=20(m=20"1991-01-09=2006:00"))=0A+=20=20=20=20=20=20=20= =20=20=20=20(calc-date-format=20'(U)))=0A+=20=20=20=20=20=20;;=20Test=20= parsing=20Unix=20time.=0A+=20=20=20=20=20=20(should=20(equal=20= (calc-tests--calc-to-number=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20(cadr=20(math-parse-date=20"0")))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20719163))=0A+=20=20=20=20= =20=20(should=20(equal=20(calc-tests--calc-to-number=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(cadr=20(math-parse-date=20= "469324800")))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(+=20719163=20(/=20469324800=2086400))))=0A+=20=20=20=20=20=20= (should=20(equal=20(calc-tests--calc-to-number=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(cadr=20(math-parse-date=20= "663400800")))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20726841.25))=0A+=0A+=20=20=20=20=20=20;;=20Test=20formatting=20Unix=20= time.=0A+=20=20=20=20=20=20(should=20(equal=20(math-format-date=20= d-1970-01-01)=20"0"))=0A+=20=20=20=20=20=20(should=20(equal=20= (math-format-date=20d-2020-09-07)=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(number-to-string=20(*=20(-=20(cadr=20= d-2020-09-07)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(cadr=20d-1970-01-01))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=2086400))))=0A+=20=20=20=20=20=20(should=20(equal=20= (math-format-date=20d-1991-01-09-0600)=20"663400800")))))=0A+=0A=20= (provide=20'calc-tests)=0A=20;;;=20calc-tests.el=20ends=20here=0A=20=0A= --=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A= --Apple-Mail=_1AE4D75C-4940-4083-9699-C6077DFD5AF7-- From unknown Sun Jun 22 03:58:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#43759: Emacs Calc date conversion 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 X-GNU-PR-Keywords: To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Lars Ingebrigtsen Cc: "43759@debbugs.gnu.org" <43759@debbugs.gnu.org> Received: via spool by 43759-submit@debbugs.gnu.org id=B43759.160166962918861 (code B ref 43759); Fri, 02 Oct 2020 20:14:02 +0000 Received: (at 43759) by debbugs.gnu.org; 2 Oct 2020 20:13:49 +0000 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 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 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 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 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 From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Thread-Topic: bug#43759: Emacs Calc date conversion Thread-Index: AQHWmKnJXDpGcmF7rUu7DtH0kZ00k6mEXaWagAA0qICAAC1BKg== Date: Fri, 2 Oct 2020 20:13:37 +0000 Message-ID: References: <87o8lkwvvj.fsf@gnus.org>,<0BC1BBB7-6524-4DA2-90D7-37807994E388@acm.org> In-Reply-To: <0BC1BBB7-6524-4DA2-90D7-37807994E388@acm.org> Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: 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 Content-Type: multipart/alternative; boundary="_000_PR3PR06MB6843E8D4268E976E4367A40A84310PR3PR06MB6843eurp_" MIME-Version: 1.0 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-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --_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_-- From unknown Sun Jun 22 03:58:53 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vincent =?UTF-8?Q?Bela=C3=AFche?= Subject: bug#43759: closed (Re: bug#43759: Emacs Calc date conversion) Message-ID: References: X-Gnu-PR-Message: they-closed 43759 X-Gnu-PR-Package: emacs Reply-To: 43759@debbugs.gnu.org Date: Fri, 02 Oct 2020 20:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1601670482-20101-1" This is a multi-part message in MIME format... ------------=_1601670482-20101-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #43759: Emacs Calc date conversion which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 43759@debbugs.gnu.org. --=20 43759: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D43759 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1601670482-20101-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 43759-done) by debbugs.gnu.org; 2 Oct 2020 20:27:46 +0000 Received: from localhost ([127.0.0.1]:42645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOReb-0005Dk-Tr for submit@debbugs.gnu.org; Fri, 02 Oct 2020 16:27:46 -0400 Received: from mail1467c50.megamailservers.eu ([91.136.14.67]:35888 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOReZ-0005DV-60 for 43759-done@debbugs.gnu.org; Fri, 02 Oct 2020 16:27:44 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1601670456; bh=3D71I5gUMk5M2tD73mcl+JimfVBwfmP75ZOiVEu3o3I=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=QFSZdsmBLl+6sH72q4waX0NvDpiPpKrjwvmHSqfhLtTxx2CCp/0awmTvHeWmyvjEk JVOzZytiNFO00d9x/rMgHZ8KMiVtAdOt6WA+h19NSqNzHv3EXEYkX9eY78zvv2B94R XWYVn9D7AUixowy4Uj1sb2gSg/WaXw5ntktXQ8b4= Feedback-ID: mattiase@acm.or Received: from stanniol.lan (c-304ee655.032-75-73746f71.bbcust.telenor.se [85.230.78.48]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 092KRXbd012492; Fri, 2 Oct 2020 20:27:36 +0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: Re: bug#43759: Emacs Calc date conversion From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 2 Oct 2020 22:27:32 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87o8lkwvvj.fsf@gnus.org> <0BC1BBB7-6524-4DA2-90D7-37807994E388@acm.org> To: =?utf-8?Q?Vincent_Bela=C3=AFche?= X-Mailer: Apple Mail (2.3445.104.17) X-CTCH-RefID: str=0001.0A782F18.5F778D38.003C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.3 cv=BZ+mLYl2 c=1 sm=1 tr=0 a=63Z2wlQ1NB3xHpgKFKE71g==:117 a=63Z2wlQ1NB3xHpgKFKE71g==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10 a=NDg2Xvr3CfqScLkejjIA:9 a=QEXdDO2ut3YA:10 a=K4Dcl9RsUEEA:10 X-Origin-Country: SE X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 2 okt. 2020 kl. 22.13 skrev Vincent Belaïche : > Definitely, I applied the patch manually, and it fixed the issue. Thank you for the prompt confirmation (and the original report, of course)! Pushed to master; closing bug. Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.3 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43759-done Cc: 43759-done@debbugs.gnu.org, Lars Ingebrigtsen X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) 2 okt. 2020 kl. 22.13 skrev Vincent Bela=C3=AFche = : > Definitely, I applied the patch manually, and it fixed the issue. Thank you for the prompt confirmation (and the original report, of = course)! Pushed to master; closing bug. ------------=_1601670482-20101-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Oct 2020 11:09:12 +0000 Received: from localhost ([127.0.0.1]:39477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOIw3-0003gT-Ey for submit@debbugs.gnu.org; Fri, 02 Oct 2020 07:09:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:52332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOIvz-0003gJ-Eu for submit@debbugs.gnu.org; Fri, 02 Oct 2020 07:09:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOIvz-0005Al-9p for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2020 07:09:07 -0400 Received: from mail-am6eur05olkn2047.outbound.protection.outlook.com ([40.92.91.47]:5024 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOIvx-0004He-K2 for bug-gnu-emacs@gnu.org; Fri, 02 Oct 2020 07:09:06 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GQM9oHXOYS6TccmmVJhy6OEPFZ72CF9TTe/LNcc4K73+XG2JJtjdtwF0TYfnIhZcfOfeHD1JtN8HUyx5hA2//jQegB21b6SFUTS/d8GEbteSF8FkdVxvLo2vPvQkugOe58ZWSTqiAhxn6hIy57eskSLKOkNRQrI+asWQYusBGoD08tK9dDt4LLu2E6NZ8bNHbuW0z37E8k2zA3I97y35z++BQHFjYDwe8nZDKHQxRAQ3/O9/nn6U+HHRMDdAUeX8yqBB8zbyNVaQGw+aLsbkAd6isjzydPTBGrRxVeFWknlgvyvg5fHSYgaTKdTVzZ8GL8+SPqrkokFHV65FzbhV3w== 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=GOYdlXXWN7DFc+NbFVrqqAucZ9FpKEbQ9Y21ywuTP+Y=; b=T2hfB/p09IVgEdxyk78OIAQbJcCnm5oo4YfdB3DKj3JA444QMd9Q8v+Wsv+Ca4M6tmCANwz2PjeO03bvqYBTnWe9CjCrE5VKZbkUGNXUffdQKNERAMKonjRn8U/4EOU/i4LbF1cvuUlIb+mnl2kQYM5xnim28uyKHgvToBDjKON0O5XwuPpFz0tTX/bP9oj1Bay20GY5uIEp85dauPRdwWcs4VNCSBIJHv9GqoiTSk3uMzBWYXTz10J43alI1fHL1fps9FzV4B36adh1wQxDF//tTC8NNoZDN0ybkrhzYBTvQYid6Lp7GAQQ38FoYWuWuzhcZAgh+Rg1J3tIEshQew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB8EUR05FT004.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::40) by DB8EUR05HT171.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::274) 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 10:53:59 +0000 Received: from PR3PR06MB6843.eurprd06.prod.outlook.com (2a01:111:e400:fc0f::4f) by DB8EUR05FT004.mail.protection.outlook.com (2a01:111:e400:fc0f::106) 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 10:53:59 +0000 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 10:53:59 +0000 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= To: "bug-gnu-emacs@gnu.org" Subject: Emacs Calc date conversion Thread-Topic: Emacs Calc date conversion Thread-Index: AQHWmKnJXDpGcmF7rUu7DtH0kZ00kw== Date: Fri, 2 Oct 2020 10:53:59 +0000 Message-ID: Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:5BAF40ACE1AB104565003F21842476C81F91D780974841F12D7EC24D2C3A1C57; UpperCasedChecksum:28E2FFB4BD43DD0C8DF22DA54A4031A349B4AE8663D4F7842A2642951D181BA5; SizeAsReceived:6637; Count:41 x-tmn: [ohWSjo+5R0TMlaO4gvFp4TgJeIoT+GY/] x-ms-publictraffictype: Email x-incomingheadercount: 41 x-eopattributedmessage: 0 x-ms-office365-filtering-correlation-id: 84ab0c79-2657-4172-ecb6-08d866c177b3 x-ms-traffictypediagnostic: DB8EUR05HT171: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WCIuGCKq6i4b2ihY399xdKYSd3G0Mq8p+5t8rxo/5/CQr8cP3lFmtaev6goF37xnyGBkDnjWc1Z5UiLCcpEANo2g9SOZPI29qKtT5kiJ8oMKb9rTF4/E+spev9iKoI60EAB/BhKClXmWPPFjX9iSbL9squUVLmGV1xtwSgbHat1/oXxmxIvTBYRtJ4POpvseTVY171p3o4V+8+2zOwC//A== x-ms-exchange-antispam-messagedata: IplVAun2A0ZzG8gPMqyB7KeenCABR54PlMnfCiuOksPcrjb7RcdRuQEm98Zto4Khi803zzS7R6vFc0i83LC/rRcAqzLqM9DDvfZRciiEkHWhSgA1rUqx0KDMZCzgNdlSJ/++dduUs0777TkkXFEgMQ== x-ms-exchange-transport-forked: True Content-Type: multipart/alternative; boundary="_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_" MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT004.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 84ab0c79-2657-4172-ecb6-08d866c177b3 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Oct 2020 10:53:59.4726 (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: DB8EUR05HT171 Received-SPF: pass client-ip=40.92.91.47; envelope-from=vincent.b.1@hotmail.fr; helo=EUR05-AM6-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/02 07:09:02 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable My Emacs version is GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, = NS appkit-1894.60 Version 10.15.6 (Build 19G73)) of 2020-07-29 I do the following exp=E9riment under Emacs CC ;; Set date format as Unix dd U RET ;; Enter 1991-01-09T06:00 in Unix format, cf. date -d '1991-01-09T06:00+00'= '+%s' ' <663400800> RET ;; Set format as ISO dd YYYY-MM-DD HH:mm:SS RET Then the display is <1991-01-10 06:00>, but I expected the 9th and not the = 10th of January. Vincent. --_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
My Emacs version is GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.= 6.0, NS appkit-1894.60 Version 10.15.6 (Build 19G73)) of 2020-07-29

I do the following exp=E9riment under Emacs CC

;; Set date format as Unix
dd U RET
;; Enter 1991-01-09T06:00 in Unix format, cf. date -d '1991-01-09T06:00+00'= '+%s'
' <663400800> RET
;; Set format as ISO
dd YYYY-MM-DD HH:mm:SS RET

Then the display is <1991-01-10 06:00>, but I expected the 9th a= nd not the 10th of January.

  Vincent.
--_000_PR3PR06MB68434775FF3968BA34A808CA84310PR3PR06MB6843eurp_-- ------------=_1601670482-20101-1--