summaryrefslogtreecommitdiff
path: root/lisp/calendar/time-date.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-08-19 16:48:59 -0700
commit07fcbb558d797272b9f43547da60beda485873a3 (patch)
tree77d5da14e9f9d9d8b1d877c70c01296fd3893796 /lisp/calendar/time-date.el
parentc9bdeff3e45a7ac84a74a81bb048046f82dddc91 (diff)
parentfb81c8c3adf8633f2f617c82f6019aef630860c7 (diff)
downloademacs-07fcbb558d797272b9f43547da60beda485873a3.tar.gz
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/calendar/time-date.el')
-rw-r--r--lisp/calendar/time-date.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el
index 2df57a3c33d..0aa38166bc1 100644
--- a/lisp/calendar/time-date.el
+++ b/lisp/calendar/time-date.el
@@ -357,7 +357,7 @@ is output until the first non-zero unit is encountered."
(format " %s%s" name
(if (= num 1) "" "s"))))
t t string))))))
- (replace-regexp-in-string "%%" "%" string))
+ (string-replace "%%" "%" string))
(defvar seconds-to-string
(list (list 1 "ms" 0.001)
@@ -525,6 +525,8 @@ changes in daylight saving time are not taken into account."
(defun decoded-time-set-defaults (time &optional default-zone)
"Set any nil values in `decoded-time' TIME to default values.
The default value is based on January 1st, 1970 at midnight.
+This year is used to guarantee portability; see Info
+node `(elisp) Time of Day'.
TIME is modified and returned."
(unless (decoded-time-second time)
@@ -539,7 +541,7 @@ TIME is modified and returned."
(unless (decoded-time-month time)
(setf (decoded-time-month time) 1))
(unless (decoded-time-year time)
- (setf (decoded-time-year time) 0))
+ (setf (decoded-time-year time) 1970))
;; When we don't have a time zone, default to DEFAULT-ZONE without
;; DST if DEFAULT-ZONE if given, and to unknown DST otherwise.