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

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

bug#55635: `make-decoded-time' incorrectly sets DST to nil, it should be


From: Paul Eggert
Subject: bug#55635: `make-decoded-time' incorrectly sets DST to nil, it should be -1 (guess)
Date: Sun, 29 May 2022 15:04:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1

On 5/29/22 06:10, Lars Ingebrigtsen wrote:
Paul Eggert <eggert@cs.ucla.edu> writes:

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.

I think that sounds correct.

I looked into that, and since decoded-time-dst is defined by cl-defstruct it's not easy to change how it works. For now, I just documented the glitch; see the 3rd attached patch.

I also installed the 1st attached patch which mentions that Emacs's decoded dst flag differs from that of Common Lisp, and the 2nd attached patch which makes iso8601 parsing compatible with what we've discussed here by having it return -1 for unknown DST flags.


> 2. make-decoded-time should generate a six-element list unless given a
> DST or ZONE arg.

I don't think we should do this.

OK, I left that alone.

Attachment: 0001-Doc-fix-for-dst-flag.patch
Description: Text Data

Attachment: 0002-ISO-8601-strings-sans-Z-don-t-specify-DST-flag.patch
Description: Text Data

Attachment: 0003-Document-decoded-time-string-issue-on-6-elt-args.patch
Description: Text Data


reply via email to

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