From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gabriel Newsgroups: gmane.emacs.bugs Subject: bug#19302: 24.4.51; `date-to-time' fails after 2038 Date: Sun, 07 Dec 2014 20:58:36 -0500 Message-ID: <87vblmc377.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1418006726 24530 80.91.229.3 (8 Dec 2014 02:45:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Dec 2014 02:45:26 +0000 (UTC) To: 19302@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 08 03:45:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XxoK7-00012L-Cj for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Dec 2014 03:45:19 +0100 Original-Received: from localhost ([::1]:59853 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxoK6-00031r-Uz for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Dec 2014 21:45:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxoJx-000303-20 for bug-gnu-emacs@gnu.org; Sun, 07 Dec 2014 21:45:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxoJq-0000Sr-10 for bug-gnu-emacs@gnu.org; Sun, 07 Dec 2014 21:45:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59525) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxoJp-0000Sh-Ug for bug-gnu-emacs@gnu.org; Sun, 07 Dec 2014 21:45:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XxoJp-00034l-No for bug-gnu-emacs@gnu.org; Sun, 07 Dec 2014 21:45:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gabriel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Dec 2014 02:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19302 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141800664611687 (code B ref -1); Mon, 08 Dec 2014 02:45:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Dec 2014 02:44:06 +0000 Original-Received: from localhost ([127.0.0.1]:56735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XxoIr-00031S-IO for submit@debbugs.gnu.org; Sun, 07 Dec 2014 21:44:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48557) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XxnbM-0001Sh-Fb for submit@debbugs.gnu.org; Sun, 07 Dec 2014 20:59:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XxnbG-0007d0-KY for submit@debbugs.gnu.org; Sun, 07 Dec 2014 20:59:04 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XxnbG-0007cw-Hi for submit@debbugs.gnu.org; Sun, 07 Dec 2014 20:58:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxnb9-0004jx-8b for bug-gnu-emacs@gnu.org; Sun, 07 Dec 2014 20:58:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xxnb2-0007M7-7J for bug-gnu-emacs@gnu.org; Sun, 07 Dec 2014 20:58:51 -0500 Original-Received: from mail-qa0-x22e.google.com ([2607:f8b0:400d:c00::22e]:44777) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xxnb2-0007Ks-2X for bug-gnu-emacs@gnu.org; Sun, 07 Dec 2014 20:58:44 -0500 Original-Received: by mail-qa0-f46.google.com with SMTP id n8so2786897qaq.33 for ; Sun, 07 Dec 2014 17:58:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=QIDEIxZpoxo+nlrLQqTT4HRyJsf1FkV14hPvtdBBtZk=; b=WEw0l+wH9S0+jsJLDdhoSFFa6FVg7kqH8H1xIs9wI+dk55C6vly2gKYpbdqttnd5JK dRB9jOxcae0t1IgPElgPZVoJiLGy3KcI4FZU2tdSH4W27YDSnXP39BEEVg5AZeNqMVIJ wQ7EbbfrqNS1RTeuYaK7JV29Oh9Ldr7Fkw/ucWSB5m5VmTheb358NnsnVezod+mmTcnp fJP2qAKec+JkzpaNcidqqDZkmaK0aOSGmT5q5PpK0enYhyNmUQ+rDal7STNEJL8hhBSo atNKYctWNxqBCZvQTeAwuiYecNYwR7yv1fNTV+S7Xsu3IXwohvB2vfVCV5BBBrr1NezL q1Dg== X-Received: by 10.224.128.68 with SMTP id j4mr28613460qas.6.1418003922903; Sun, 07 Dec 2014 17:58:42 -0800 (PST) Original-Received: from zag-HP-G60-Notebook-PC (modemcable157.29-131-66.mc.videotron.ca. [66.131.29.157]) by mx.google.com with ESMTPSA id s1sm36645607qak.43.2014.12.07.17.58.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 07 Dec 2014 17:58:41 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sun, 07 Dec 2014 21:43:59 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96975 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-calendar-time-date.el-date-to-time-Doc-fix.patch Content-Description: Doc fix patch to `date-to-time' >From c90da02532e7025d6f73f288244f487c77ab9538 Mon Sep 17 00:00:00 2001 From: Gabriel Beauchamp 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 + + * calendar/time-date.el (date-to-time): Doc fix. + 2014-12-07 Lars Magne Ingebrigtsen * 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 --=-=-=--