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