GNU bug report logs - #43759
Emacs Calc date conversion

Previous Next

Package: emacs;

Reported by: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>

Date: Fri, 2 Oct 2020 11:10:02 UTC

Severity: normal

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 43759 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Vincent Belaïche <vincent.b.1 <at> hotmail.fr>,
 43759 <at> debbugs.gnu.org
Subject: Re: bug#43759: Emacs Calc date conversion
Date: Fri, 2 Oct 2020 19:31:09 +0200
[Message part 1 (text/plain, inline)]
2 okt. 2020 kl. 16.22 skrev Lars Ingebrigtsen <larsi <at> 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 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?

[0001-Calc-fix-formatting-and-parsing-Unix-time-bug-43759.patch (application/octet-stream, attachment)]

This bug report was last modified 4 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.