GNU bug report logs - #48298
Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))

Previous Next

Package: emacs;

Reported by: Евгений Михайлов <lewwadoo <at> gmail.com>

Date: Sat, 8 May 2021 20:59:01 UTC

Severity: normal

Merged with 48290

Found in versions 27.1, 27.2

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 48298 <at> debbugs.gnu.org, lewwadoo <at> gmail.com
Subject: bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
Date: Sun, 09 May 2021 11:03:59 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>>    (unless (decoded-time-year time)
>> -    (setf (decoded-time-year time) 0))
>> +    (setf (decoded-time-year time) 1970))
>
> Sure; that makes as much sense as anything, but the doc string should
> perhaps mention it.

It already does:

  The default value is based on January 1st, 1970 at midnight.

Can it be clarified further?

> (All the other defaults are as zero-ish as possible, and 1970 is used
> here only because of technical limitations.)

Is it worth mentioning in the docstring that 1970 is chosen to guarantee
portability, similar to the note in encode-time's docstring?

Thanks,

-- 
Basil




This bug report was last modified 4 years and 62 days ago.

Previous Next


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