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

From: "Basil L. Contovounesios" <[email-masked]>
Date: Sat, 08 May 2021 23:37:43 +0100

forcemerge 48290 48298
quit

Евгений Михайлов <[email-masked]> writes:

> (my-mins-between "11:30" "12:04")
>
> (defun my-mins-between (time1 time2)
>   "Return the minutes between HH:mm strings TIME1 and TIME2."
>   (let ((diff (apply #'time-subtract
>                      (mapcar (lambda (time)
>                                (encode-time (decoded-time-set-defaults
>                                              (parse-time-string time))))
>                              (list time1 time2)))))
>     (/ (float-time diff) 60)))
>
> Debugger entered--Lisp error: (error "Invalid time specification")
>   encode-time((0 30 11 1 1 0 nil -1 nil))
>   (lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time))))("11:30")
>   mapcar((lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string time)))) ("11:30" "12:04"))

I'm not sure what happened that resulted in two bug reports being
submitted, but this looks like the missing description from
https://bugs.gnu.org/48290, so I'm merging the two reports.

Thanks,

-- 
Basil