diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-04 10:33:32 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-12-04 10:36:07 -0800 |
commit | 63be97fb050545cc33ae5d857188ad45fbe27715 (patch) | |
tree | 8a85954020012b2a0c467f262d5be51961b4c52c /etc/NEWS | |
parent | 7384a329d2582e28e28eb8f8e568f7688dceea38 (diff) | |
download | emacs-63be97fb050545cc33ae5d857188ad45fbe27715.tar.gz |
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.
Diffstat (limited to 'etc/NEWS')
-rw-r--r-- | etc/NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1084,6 +1084,10 @@ cookies set by web pages on disk. ** New variable 'help-buffer-under-preparation'. This variable is bound to t during the preparation of a "*Help*" buffer. ++++ +** 'date-to-time' now assumes earliest values if its argument lacks +month, day, or time. For example, (date-to-time "2021-12-04") now +assumes a time of 00:00 instead of signaling an error. * Changes in Emacs 29.1 on Non-Free Operating Systems |