changeset 15680:0f1c12e35879

(texinfo-format-today): Avoid race condition by getting current time only once.
author Karl Heuer <kwzh@gnu.org>
date Mon, 15 Jul 1996 20:26:39 +0000
parents 4942f03c75f8
children b0652f55a85d
files lisp/textmodes/texinfmt.el
diffstat 1 files changed, 1 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/texinfmt.el	Mon Jul 15 20:23:12 1996 +0000
+++ b/lisp/textmodes/texinfmt.el	Mon Jul 15 20:26:39 1996 +0000
@@ -891,11 +891,6 @@
           (file-name-nondirectory (expand-file-name arg)))
     (insert "Info file: "
             texinfo-format-filename ",    -*-Text-*-\n"
-            ;; Date string removed so that regression testing is easier.
-            ;; "produced on "
-            ;; (substring (current-time-string) 8 10) " "
-            ;; (substring (current-time-string) 4 7) " "
-            ;; (substring (current-time-string) -4)  " "
             "produced by `texinfo-format-buffer'\n"
             "from file"
             (if (buffer-file-name input-buffer)
@@ -1568,10 +1563,7 @@
 ; The `@today{}' command requires a pair of braces, like `@dots{}'.
 (defun texinfo-format-today ()
   (texinfo-parse-arg-discard)
-  (insert (format "%s %s %s"
-          (substring (current-time-string) 8 10)
-          (substring (current-time-string) 4 7)
-          (substring (current-time-string) -4))))
+  (insert (format-time-string "%e %b %Y")))
 
 
 ;;; @ignore