comparison lisp/gnus-msg.el @ 15298:7c0be13394a1

(gnus-inews-date): Avoid race condition.
author Karl Heuer <kwzh@gnu.org>
date Tue, 28 May 1996 15:43:27 +0000
parents ab3a6813575a
children 530d0d516a42
comparison
equal deleted inserted replaced
15297:befefbf0670f 15298:7c0be13394a1
1381 ".fsf"))) 1381 ".fsf")))
1382 1382
1383 1383
1384 (defun gnus-inews-date () 1384 (defun gnus-inews-date ()
1385 "Current time string." 1385 "Current time string."
1386 (timezone-make-date-arpa-standard 1386 ;; We call (current-time) once, rather than letting current-time-string and
1387 (current-time-string) (current-time-zone))) 1387 ;; current-time-zone default to it, because that avoids a rare race
1388 ;; condition when the time zone changes between those two calls.
1389 (let ((now (current-time)))
1390 (timezone-make-date-arpa-standard
1391 (current-time-string now) (current-time-zone now))))
1388 1392
1389 (defun gnus-inews-organization () 1393 (defun gnus-inews-organization ()
1390 "Return user's organization. 1394 "Return user's organization.
1391 The ORGANIZATION environment variable is used if defined. 1395 The ORGANIZATION environment variable is used if defined.
1392 If not, the variable `gnus-local-organization' is used instead. 1396 If not, the variable `gnus-local-organization' is used instead.