1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 14:30:50 -08:00

Use numeric time zone suffix in ERT explainer.

This is more robust since the time zone name is system-dependent.

* lisp/emacs-lisp/ert.el (ert--explain-time-equal-p): Use numeric time
zone suffix.

* test/lisp/emacs-lisp/ert-tests.el (ert-test-explain-time-equal-p):
Adapt test.
This commit is contained in:
Philipp Stephani 2025-03-26 03:32:46 +01:00
parent 56248fad53
commit 2d278a0f2e
2 changed files with 4 additions and 4 deletions

View file

@ -676,8 +676,8 @@ A and B are the time values to compare."
(side-effect-free t))
(unless (time-equal-p a b)
`(different-time-values
,(format-time-string "%F %T.%N %Z" a t)
,(format-time-string "%F %T.%N %Z" b t)
,(format-time-string "%F %T.%N%z" a t)
,(format-time-string "%F %T.%N%z" b t)
difference
,(format-time-string "%s.%N" (time-subtract a b) t))))
(function-put #'time-equal-p 'ert-explainer #'ert--explain-time-equal-p)