Re: current-time-list now defaults to nil in Emacs master

Madhu via "Emacs development discussions." <[email protected]>
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
* Stefan Monnier via "Emacs development discussions." <[email protected]> :
Wrote on Tue, 28 Jul 2026 11:54:05 -0400:
>> So should I dynamically bind current-time-list around calls to
>> current-time in these old packages?
>
> The better alternative (beside adjust the code so it works with the new
> format) is to insert a call to `time-convert`, as suggested in the
> `current-time` docstring.

Some comments for the (my own) record

I spotted a difference (in "legacy code"), though it probably makes no
difference to code which didnt check for endp cddr

(setq current-time-list nil)

(setq $a "Fri Aug 14 12:51:33 2026 +0530")
(let ((current-time-list t)) (encode-time (parse-time-string $a)))
; (27262 49661)

(time-convert (encode-time (parse-time-string $a)) 'list)
;(27262 49661 0 0)


Another possible point of tripping is the interpretation of FORM in
time-convert vs the interpretetaion of FORM in decode-time and
parse-time-string
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.