           ;;
           ;; * BSD find shipped with macOS >=10.11
           ;; * GNU find >=4.4.2
-          (mtime (format-time-string "%F %T%z")))
+          (mtime (straight--format-timestamp)))
       (straight--insert 0 package mtime straight--build-cache))
     (straight--insert 2 package recipe straight--build-cache)))
 

              ;; know.
              (or (not (stringp last-mtime))
                  (with-temp-buffer
                    (let* ((default-directory
                             (straight--dir "repos" local-repo))
                           ;; This find(1) command ignores the .git
                           ;; directory, and prints the names of any
                           ;; files or directories with a newer mtime
                           ;; than the one specified.
                           (args `("." "-name" ".git" "-prune"
                                   "-o" "-newermt" ,last-mtime "-print"))
                           (return (apply #'call-process "find"
                                          nil '(t t) nil args)))
                      (unless (= 0 return)
                        (error "Command failed: find %s:\n%s"
                               (string-join
                                (mapcar #'shell-quote-argument args)
                                " ")
                               (buffer-string)))
                      ;; If anything was printed, the package has
                      ;; (maybe) been modified.
                      (> (buffer-size) 0))))))))))

;;;; Building packages
;;;;; Files directive processing

  (expand-file-name
   (substring (apply 'straight--dir segments) 0 -1)))

(defun straight--mtime-dir (&rest segments)
  "Get a subdirectory of straight/mtimes/.
SEGMENTS are passed to `straight--dir'."
  (apply #'straight--dir "mtimes" segments))

(defun straight--mtime-file (&rest segments)
  "Get a file in the straight/mtimes/ directory.
SEGMENTS are passed to `straight--file'."
  (apply #'straight--file "mtimes" segments))

(defun straight--autoload-file-name (package)
  "Get the bare filename of the autoload file for PACKAGE.
PACKAGE should be a string. The filename does not include the
