summaryrefslogtreecommitdiff
path: root/lisp/vc/add-log.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/vc/add-log.el')
-rw-r--r--lisp/vc/add-log.el23
1 files changed, 8 insertions, 15 deletions
diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index eb7e5bfdfad..c90413c42c2 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -581,8 +581,8 @@ If t, use universal time.")
(put 'add-log-time-zone-rule 'safe-local-variable
(lambda (x) (or (booleanp x) (stringp x))))
-(defun add-log-iso8601-time-zone (&optional time)
- (let* ((utc-offset (or (car (current-time-zone time)) 0))
+(defun add-log-iso8601-time-zone (&optional time zone)
+ (let* ((utc-offset (or (car (current-time-zone time zone)) 0))
(sign (if (< utc-offset 0) ?- ?+))
(sec (abs utc-offset))
(ss (% sec 60))
@@ -596,12 +596,11 @@ If t, use universal time.")
(defvar add-log-iso8601-with-time-zone nil)
-(defun add-log-iso8601-time-string ()
- (let ((time (format-time-string "%Y-%m-%d"
- nil (eq t add-log-time-zone-rule))))
+(defun add-log-iso8601-time-string (&optional time zone)
+ (let ((date (format-time-string "%Y-%m-%d" time zone)))
(if add-log-iso8601-with-time-zone
- (concat time " " (add-log-iso8601-time-zone))
- time)))
+ (concat date " " (add-log-iso8601-time-zone time zone))
+ date)))
(defun change-log-name ()
"Return (system-dependent) default name for a change log file."
@@ -848,14 +847,8 @@ non-nil, otherwise in local time."
(let ((new-entries
(mapcar (lambda (addr)
(concat
- (if (stringp add-log-time-zone-rule)
- (let ((tz (getenv "TZ")))
- (unwind-protect
- (progn
- (setenv "TZ" add-log-time-zone-rule)
- (funcall add-log-time-format))
- (setenv "TZ" tz)))
- (funcall add-log-time-format))
+ (funcall add-log-time-format
+ nil add-log-time-zone-rule)
" " full-name
" <" addr ">"))
(if (consp mailing-address)