bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52209: 28.0.60; [PATCH] date-to-time fails on pure dates


From: Paul Eggert
Subject: bug#52209: 28.0.60; [PATCH] date-to-time fails on pure dates
Date: Sat, 4 Dec 2021 10:58:37 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

Unfortunately the latest change to time-date.el reintroduced Bug#52209. I installed the attached patch to fix this, and to add some test cases mentioned in this bug report to help prevent the problem recurring. Also, this patch documents the new feature, and avoids overenthusiastically guessing the year to be 1970 when the date string lacks a year.

(These functions were never really intended to support parsing dates
like that -- only strict RFC822 date strings were originally supported,
but it's become more DWIM as time has passed.

Yes, date-to-time has definitely ... evolved.

My understanding is that date-to-time's RFC822 parsing is present only for backward compatibility, and that we shouldn't attempt to enhance it (here, the enhancement would be pointless as the RFC822 parsing fills in the blanks anyway). So the patch I just installed adds the new feature only for the normal path taken, when not doing the RFC822 hack.


PS. Internet RFC 822 has been obsolete since 2001, and the Emacs code should be talking about RFC 5322 everywhere except when Emacs is explicitly supporting the obsolete standard instead of the current standard. And we should rename functions like rfc822-goto-eoh to rfc-email-goto-eoh, to help avoid confusion or further function renaming. But I digress....

Attachment: 0001-Fix-date-to-time-2021-12-04.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]