Mercurial > emacs
changeset 15298:7c0be13394a1
(gnus-inews-date): Avoid race condition.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 28 May 1996 15:43:27 +0000 |
parents | befefbf0670f |
children | 8ff4f4e1b487 |
files | lisp/gnus-msg.el |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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.