From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#55635: `make-decoded-time' incorrectly sets DST to nil, it should be -1 (guess) Date: Sat, 28 May 2022 10:25:51 -0700 Organization: UCLA Computer Science Department Message-ID: References: <940415ce-2e31-ae18-3e16-8fdc54504a67@gmail.com> <87o7zkbif3.fsf@gnus.org> <96e9d729-2e23-5637-3136-ac29e26aa287@cs.ucla.edu> <87r14f8dhw.fsf@gnus.org> <87zgj23pn9.fsf@gnus.org> <0e506652-fb7d-5707-8247-7747ff1e53b0@gmail.com> <83o7zhlht0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25363"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Cc: larsi@gnus.org, 55635-done@debbugs.gnu.org, Maxim Nikulin To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 28 19:26:56 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nv0DI-0006Lx-5Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 May 2022 19:26:56 +0200 Original-Received: from localhost ([::1]:60968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nv0DG-0000Kw-Rk for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 28 May 2022 13:26:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nv0CR-0008Kj-Vo for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 13:26:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nv0CP-0003EJ-VO for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 13:26:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nv0CP-0002IY-Ob for bug-gnu-emacs@gnu.org; Sat, 28 May 2022 13:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 May 2022 17:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55635 X-GNU-PR-Package: emacs Original-Received: via spool by 55635-done@debbugs.gnu.org id=D55635.16537587618827 (code D ref 55635); Sat, 28 May 2022 17:26:01 +0000 Original-Received: (at 55635-done) by debbugs.gnu.org; 28 May 2022 17:26:01 +0000 Original-Received: from localhost ([127.0.0.1]:38847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv0CO-0002II-Ja for submit@debbugs.gnu.org; Sat, 28 May 2022 13:26:00 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nv0CN-0002I2-3V for 55635-done@debbugs.gnu.org; Sat, 28 May 2022 13:25:59 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 79097160091; Sat, 28 May 2022 10:25:53 -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 R7KozG6yxmdp; Sat, 28 May 2022 10:25:52 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5AB0D160172; Sat, 28 May 2022 10:25:52 -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 QW1vMfmwitQM; Sat, 28 May 2022 10:25:52 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 16FF4160091; Sat, 28 May 2022 10:25:52 -0700 (PDT) Content-Language: en-US In-Reply-To: <83o7zhlht0.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:233269 Archived-At: On 5/28/22 09:53, Eli Zaretskii wrote: > this situation already exists with time units anyway. You can add > an hour to some other time, but there's also a valid time stamp that > expresses 1 hour past the epoch UTC, and their values are exactly > identical. Quite true for encoded times that count seconds. However, Max also has a point that decoded timestamps like (19 17 10 28 5 2022 6 t -25200) are problematic as relative times. Although their first six elements can be treated as either relative or absolute, their last three elements don't make much sense in relative times. The recent change in the master branch that lets encode-time take six-element lists suggests that perhaps a better way to represent a relative decoded time would be as a 6-element list. With that in mind, here are three suggestions. 1. decoded-time-dst should return -1, instead of nil, when given a 6-element list, since nil means standard time and -1 means DST is unknown. 2. make-decoded-time should generate a six-element list unless given a DST or ZONE arg. 3. Document the above nicely. (This is the hardest part....)