GNU bug report logs - #48290
27.2; 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 16:52:02 UTC

Severity: normal

Merged with 48298

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: Eli Zaretskii <eliz <at> gnu.org>
Cc: 48290 <at> debbugs.gnu.org, Евгений Михайлов <lewwadoo <at> gmail.com>
Subject: bug#48290: 27.2; Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
Date: Sat, 08 May 2021 18:16:01 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Евгений Михайлов
>>  <lewwadoo <at> gmail.com>
>> Date: Sat, 8 May 2021 19:41:14 +0300
>
> Why do you think it's a bug.

I'm not Evgeny, but I think it's because the titular time spec includes
defaults set by decoded-time-set-defaults:

  (parse-time-string "11:30")
  ;; => (0 30 11 nil nil nil nil -1 nil)

  (decoded-time-set-defaults (parse-time-string "11:30"))
  ;; => (0 30 11 1 1 0 nil -1 nil)

Here's the context: https://emacs.stackexchange.com/q/64686/15748

> Year 0 is 1970 years before the epoch.

Ah, I missed the last part in the docstring of encode-time:

  Years before 1970 are not guaranteed to work.  On some systems,
  year values as low as 1901 do work.

So I don't know whether my suggested use of decoded-time-set-defaults is
wrong, or whether that function should set the year to 1970, as might be
assumed from its docstring.

Thanks,

-- 
Basil




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

Previous Next


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