diff options
| author | Stefan Monnier | 2006-04-26 14:16:05 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2006-04-26 14:16:05 +0000 |
| commit | 0739a962ae4c02e6392fc9e364f8f2186cbc5e99 (patch) | |
| tree | c2d6095984506e290459fd85e3a128cd5fecb941 | |
| parent | 13384ea67e4819c703f42fa09344a614a0e76dbd (diff) | |
| download | emacs-0739a962ae4c02e6392fc9e364f8f2186cbc5e99.tar.gz emacs-0739a962ae4c02e6392fc9e364f8f2186cbc5e99.zip | |
(add-log-iso8601-time-zone): Make parameter optional.
(add-log-iso8601-time-string): Fix call to format-time-string.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/add-log.el | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d2d3cd6f9b0..dea1f0b9efe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-04-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * add-log.el (add-log-iso8601-time-zone): Make parameter optional. | ||
| 4 | (add-log-iso8601-time-string): Fix call to format-time-string. | ||
| 5 | |||
| 1 | 2006-04-26 Kim F. Storm <storm@cua.dk> | 6 | 2006-04-26 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * subr.el (posn-string, posn-image, posn-object): Doc fix. | 8 | * subr.el (posn-string, posn-image, posn-object): Doc fix. |
diff --git a/lisp/add-log.el b/lisp/add-log.el index b47494194d4..47a839d539d 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el | |||
| @@ -295,7 +295,7 @@ It takes the same format as the TZ argument of `set-time-zone-rule'. | |||
| 295 | If nil, use local time. | 295 | If nil, use local time. |
| 296 | If t, use universal time.") | 296 | If t, use universal time.") |
| 297 | 297 | ||
| 298 | (defun add-log-iso8601-time-zone (time) | 298 | (defun add-log-iso8601-time-zone (&optional time) |
| 299 | (let* ((utc-offset (or (car (current-time-zone time)) 0)) | 299 | (let* ((utc-offset (or (car (current-time-zone time)) 0)) |
| 300 | (sign (if (< utc-offset 0) ?- ?+)) | 300 | (sign (if (< utc-offset 0) ?- ?+)) |
| 301 | (sec (abs utc-offset)) | 301 | (sec (abs utc-offset)) |
| @@ -311,7 +311,8 @@ If t, use universal time.") | |||
| 311 | (defvar add-log-iso8601-with-time-zone nil) | 311 | (defvar add-log-iso8601-with-time-zone nil) |
| 312 | 312 | ||
| 313 | (defun add-log-iso8601-time-string () | 313 | (defun add-log-iso8601-time-string () |
| 314 | (let ((time (format-time-string "%Y-%m-%d" (eq t add-log-time-zone-rule)))) | 314 | (let ((time (format-time-string "%Y-%m-%d" |
| 315 | nil (eq t add-log-time-zone-rule)))) | ||
| 315 | (if add-log-iso8601-with-time-zone | 316 | (if add-log-iso8601-with-time-zone |
| 316 | (concat time " " (add-log-iso8601-time-zone)) | 317 | (concat time " " (add-log-iso8601-time-zone)) |
| 317 | time))) | 318 | time))) |