Blob Blame History Raw
--- rpm-spec-mode.el~	2009-06-11 11:01:53.000000000 +0200
+++ rpm-spec-mode.el	2009-06-11 11:05:24.000000000 +0200
@@ -708,6 +708,17 @@
 
 ;;------------------------------------------------------------
 
+(defvar rpm-change-log-uses-utc nil
+  "*If non-nil, \\[rpm-add-change-log-entry] will use Universal time (UTC).
+If this is nil, it uses local time as returned by `current-time'.
+
+This variable is global by default, but you can make it buffer-local.")
+
+(defsubst rpm-change-log-date-string ()
+  "Return the date string for today, inserted by \\[rpm-add-change-log-entry].
+If `rpm-change-log-uses-utc' is nil, \"today\" means the local time zone."
+  (format-time-string "%a %b %e %Y" nil rpm-change-log-uses-utc))
+
 (defun rpm-add-change-log-entry (&optional change-log-entry)
   "Find change log and add an entry for today."
   (interactive "sChange log entry: ")
@@ -715,8 +726,8 @@
     (rpm-goto-section "changelog")
     (let* ((address (rpm-spec-user-mail-address))
            (fullname (or rpm-spec-user-full-name (user-full-name)))
-           (string (concat "* " (substring (current-time-string) 0 11)
-                           (substring (current-time-string) -4) " "
+           (system-time-locale "C")
+           (string (concat "* " (rpm-change-log-date-string) " "
                            fullname " <" address ">"
                            (and rpm-spec-insert-changelog-version
                                 (concat " - " (rpm-find-spec-version t))))))