]> git.eshelyaron.com Git - emacs.git/commit
Fix (date-to-time "2021-12-04")
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Dec 2021 18:33:32 +0000 (10:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Dec 2021 18:36:07 +0000 (10:36 -0800)
commit63be97fb050545cc33ae5d857188ad45fbe27715
tree8a85954020012b2a0c467f262d5be51961b4c52c
parent7384a329d2582e28e28eb8f8e568f7688dceea38
Fix (date-to-time "2021-12-04")

This should complete the fix for Bug#52209.
* lisp/calendar/time-date.el (date-to-time): Apply
decoded-time-set-defaults only to the output of (parse-time-string
date), and only when the output has a year (to avoid confusion
when dates lack years).  There is no point applying it after
timezone-make-date-arpa-standard since the latter fills in all the
blanks.  And the former code mistakenly called encode-time on an
already-encoded time.  This goes back to the code a couple of days
ago, except with changed behavior (to fix Bug#52209) only when
timezone-make-date-arpa-standard is not called.
* test/lisp/calendar/time-date-tests.el (test-date-to-time)
(test-days-between): New tests.
doc/lispref/os.texi
etc/NEWS
lisp/calendar/time-date.el
test/lisp/calendar/time-date-tests.el