GNU bug report logs - #55635
`make-decoded-time' incorrectly sets DST to nil, it should be -1 (guess)

Previous Next

Package: emacs;

Reported by: Maxim Nikulin <m.a.nikulin <at> gmail.com>

Date: Wed, 25 May 2022 14:48:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 55635-done <at> debbugs.gnu.org, Maxim Nikulin <m.a.nikulin <at> gmail.com>
Subject: bug#55635: `make-decoded-time' incorrectly sets DST to nil, it should be -1 (guess)
Date: Sun, 29 May 2022 15:10:19 +0200
Paul Eggert <eggert <at> 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.

> 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.  Yes, the remaining elements are
nonsensical when talking about intervals, but people rely on that
function to return its documented value.  If somebody wants to do
interval calculations and passes in a DST to make-decoded-time, that's a
classic "well, don't do that" situation.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.