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

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

bug#19302: closed (24.4.51; `date-to-time' fails after 2038)


From: GNU bug Tracking System
Subject: bug#19302: closed (24.4.51; `date-to-time' fails after 2038)
Date: Mon, 02 Mar 2020 10:44:02 +0000

Your message dated Mon, 02 Mar 2020 11:43:02 +0100
with message-id <address@hidden>
and subject line Re: bug#19302: 24.4.51; `date-to-time' fails after 2038
has caused the debbugs.gnu.org bug report #19302,
regarding 24.4.51; `date-to-time' fails after 2038
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
19302: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19302
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.4.51; `date-to-time' fails after 2038 Date: Sun, 07 Dec 2014 20:58:36 -0500
The function `date-to-time' will fail if the argument if after
19-Jan-2038 03:14:07 GMT.

It doesn't seem documented everywhere (unless the 'Year 2038 problem' is
assumed knowledge).

I don't think I can actually fix it. But I wrote a little patch to at
least make it clear in the doc string.

>From c90da02532e7025d6f73f288244f487c77ab9538 Mon Sep 17 00:00:00 2001
From: Gabriel Beauchamp <address@hidden>
Date: Sun, 7 Dec 2014 20:46:30 -0500
Subject: [PATCH] calendar/time-date.el (date-to-time): Doc fix.

---
 lisp/ChangeLog             | 4 ++++
 lisp/calendar/time-date.el | 4 +++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a1d60d1..30e704f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-08  Gabriel Beauchamp <address@hidden>
+
+       * calendar/time-date.el (date-to-time): Doc fix.
+
 2014-12-07  Lars Magne Ingebrigtsen  <address@hidden>
 
        * net/eww.el (eww-follow-link): Revert prefix behaviour to
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index e7a8cc7..4e67adc 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -146,7 +146,9 @@ it is assumed that PICO was omitted and should be treated 
as zero."
 ;; values.  timezone-make-date-arpa-standard should help.
 (defun date-to-time (date)
   "Parse a string DATE that represents a date-time and return a time value.
-If DATE lacks timezone information, GMT is assumed."
+If DATE lacks timezone information, GMT is assumed.
+If DATE is after 19-Jan-2038 03:14:07 GMT, `date-to-time' will fail
+and raise an error."
   (condition-case err
       (apply 'encode-time (parse-time-string date))
     (error
-- 
1.8.3.2


--- End Message ---
--- Begin Message --- Subject: Re: bug#19302: 24.4.51; `date-to-time' fails after 2038 Date: Mon, 02 Mar 2020 11:43:02 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)
Stefan Monnier <address@hidden> writes:

> I think it'll make more sense to open a new report if/when the need
> shows up.

Thanks.  I'm therefore closing the bug now.

Best regards,
Stefan Kangas


--- End Message ---

reply via email to

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