From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#37974: eww produces "error in process filter: Specified time is not representable" Date: Fri, 1 Nov 2019 16:22:58 -0700 Organization: UCLA Computer Science Department Message-ID: <36cdeda8-7636-ef1b-8f3a-4b4bf21a1117@cs.ucla.edu> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5E8BDE457F34A29E745EA5F6" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="77957"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 Cc: 37974@debbugs.gnu.org To: "A.C." Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Nov 02 00:24:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQgHD-000KAz-7X for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Nov 2019 00:24:19 +0100 Original-Received: from localhost ([::1]:43854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQgHB-00051U-TO for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 19:24:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49366) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQgH4-00051B-06 for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 19:24:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQgH2-0004SX-CB for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 19:24:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48709) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQgGz-0004Oc-2m for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 19:24:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQgGw-0008S0-9V for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 19:24:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2019 23:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37974 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 37974-submit@debbugs.gnu.org id=B37974.157265058932397 (code B ref 37974); Fri, 01 Nov 2019 23:24:02 +0000 Original-Received: (at 37974) by debbugs.gnu.org; 1 Nov 2019 23:23:09 +0000 Original-Received: from localhost ([127.0.0.1]:57530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQgG4-0008QS-O9 for submit@debbugs.gnu.org; Fri, 01 Nov 2019 19:23:09 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36474) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQgG2-0008Pd-Ft for 37974@debbugs.gnu.org; Fri, 01 Nov 2019 19:23:07 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 30E9E160172; Fri, 1 Nov 2019 16:23:00 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gohfsmAqwDDS; Fri, 1 Nov 2019 16:22:59 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 12F88160571; Fri, 1 Nov 2019 16:22:59 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sdhQ75TWpl2l; Fri, 1 Nov 2019 16:22:58 -0700 (PDT) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E8C42160570; Fri, 1 Nov 2019 16:22:58 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:170710 Archived-At: This is a multi-part message in MIME format. --------------5E8BDE457F34A29E745EA5F6 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11/1/19 1:05 AM, Paul Eggert wrote: > That's due to operating system limits, and is not eww's fault per se. That being said, this bug report suggests that the issue of OS limits on timestamps should be documented better. I installed the attached to try to do that. --------------5E8BDE457F34A29E745EA5F6 Content-Type: text/x-patch; charset=UTF-8; name="0001-Document-limits-on-some-time-conversion-functions.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Document-limits-on-some-time-conversion-functions.patch" >From feb7e22ed4598baacf08378f2208caba0d214e97 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 1 Nov 2019 16:13:31 -0700 Subject: [PATCH] Document limits on some time-conversion functions * doc/lispref/os.texi (Time of Day, Time Zone Rules) (Time Conversion, Time Parsing, Time Calculations): Document functions that limit the range of time values due to OS limits (Bug#37974). --- doc/lispref/os.texi | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index d8d0ad7206..d3ddee251b 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1307,7 +1307,14 @@ Time of Day time, a single floating-point number for seconds, or a list @code{(@var{high} @var{low} @var{micro})} or @code{(@var{high} @var{low})} that is a truncated list timestamp with missing elements -taken to be zero. You can convert a time value into +taken to be zero. + +Time values can be converted to and from calendrical and other forms. +Some of these conversions rely on operating system functions that +limit the range of possible time values, and signal an error if the +limits are exceeded. For instance, a system may not support years +before 1970, or years before 1901, or years far in the future. +You can convert a time value into a human-readable string using @code{format-time-string}, into a Lisp timestamp using @code{time-convert}, and into other forms using @code{decode-time} and @code{float-time}. These functions are @@ -1328,11 +1335,12 @@ Time of Day The argument @var{time}, if given, specifies a time to format, instead of the current time. The optional argument @var{zone} defaults to the current time zone rule. @xref{Time Zone Rules}. +The operating system limits the range of time and zone values. @example @group (current-time-string) - @result{} "Wed Oct 14 22:21:05 1987" + @result{} "Fri Nov @ 1 15:59:49 2019" @end group @end example @end defun @@ -1416,6 +1424,7 @@ Time Zone Rules The argument @var{time}, if given, specifies a time value to analyze instead of the current time. The optional argument @var{zone} defaults to the current time zone rule. +The operating system limits the range of time and zone values. @end defun @node Time Conversion @@ -1498,6 +1507,8 @@ Time Conversion This function converts a time value into calendrical information. If you don't specify @var{time}, it decodes the current time, and similarly @var{zone} defaults to the current time zone rule. @xref{Time Zone Rules}. +The operating system limits the range of time and zone values. + The @var{form} argument controls the form of the returned @var{seconds} element, as described below. The return value is a list of nine elements, as follows: @@ -1631,6 +1642,7 @@ Time Conversion Year numbers less than 100 are not treated specially. If you want them to stand for years above 1900, or years above 2000, you must alter them yourself before you call @code{encode-time}. +The operating system limits the range of time values. The @code{encode-time} function acts as a rough inverse to @code{decode-time}. For example, you can pass the output of @@ -1643,11 +1655,6 @@ Time Conversion You can perform simple date arithmetic by using out-of-range values for @var{seconds}, @var{minutes}, @var{hour}, @var{day}, and @var{month}; for example, day 0 means the day preceding the given month. - -The operating system puts limits on the range of possible time values; -if the limits are exceeded while encoding the time, an error results. -For instance, years before 1970 do not work on some systems; -on others, years as early as 1901 do work. @end defun @node Time Parsing @@ -1666,6 +1673,7 @@ Time Parsing a date-time, and should be in one of the forms recognized by @code{parse-time-string} (see below). This function assumes the GMT timezone if @var{string} lacks an explicit timezone information. +The operating system limits the range of time values. @end defun @defun parse-time-string string @@ -1847,10 +1855,12 @@ Time Parsing This function uses the C library function @code{strftime} (@pxref{Formatting Calendar Time,,, libc, The GNU C Library Reference Manual}) to do most of the work. In order to communicate with that -function, it first encodes its argument using the coding system +function, it first converts @var{time} and @var{zone} to internal form; +the operating system limits the range of time and zone values. +This function also encodes @var{format-string} using the coding system specified by @code{locale-coding-system} (@pxref{Locales}); after @code{strftime} returns the resulting string, -@code{format-time-string} decodes the string using that same coding +this function decodes the string using that same coding system. @end defun @@ -1990,10 +2000,12 @@ Time Calculations @defun time-to-days time-value This function returns the number of days between the beginning of year 1 and @var{time-value}. +The operating system limits the range of time values. @end defun @defun time-to-day-in-year time-value This returns the day number within the year corresponding to @var{time-value}. +The operating system limits the range of time values. @end defun @defun date-leap-year-p year @@ -2002,7 +2014,7 @@ Time Calculations @defun date-days-in-month year month Return the number of days in @var{month} in @var{year}. For instance, -there's 29 days in February 2004. +February 2020 has 29 days. @end defun @defun date-ordinal-to-time year ordinal -- 2.23.0 --------------5E8BDE457F34A29E745EA5F6--