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

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

bug#48290: 27.2; Invalid time specification: encode-time((0 30 11 1 1 0


From: Basil L. Contovounesios
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Евгений Михайлов
>>  <lewwadoo@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





reply via email to

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