# HG changeset patch # User Karl Heuer # Date 833298207 0 # Node ID 7c0be13394a16353a610661367964184545115a5 # Parent befefbf0670f1a9bcd56f0c773be9f5bc066feee (gnus-inews-date): Avoid race condition. diff -r befefbf0670f -r 7c0be13394a1 lisp/gnus-msg.el --- a/lisp/gnus-msg.el Tue May 28 15:42:20 1996 +0000 +++ b/lisp/gnus-msg.el Tue May 28 15:43:27 1996 +0000 @@ -1383,8 +1383,12 @@ (defun gnus-inews-date () "Current time string." - (timezone-make-date-arpa-standard - (current-time-string) (current-time-zone))) + ;; We call (current-time) once, rather than letting current-time-string and + ;; current-time-zone default to it, because that avoids a rare race + ;; condition when the time zone changes between those two calls. + (let ((now (current-time))) + (timezone-make-date-arpa-standard + (current-time-string now) (current-time-zone now)))) (defun gnus-inews-organization () "Return user's organization.