diff options
| author | Paul Eggert | 2016-04-02 23:43:44 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-04-02 23:44:18 -0700 |
| commit | b787d5501bad8036016d835faa2f90bb0904c038 (patch) | |
| tree | 1bc1ab283f0ef8cf95a16afbbb71a682fbf5d180 | |
| parent | 13c8f29ce361e3aad71cf2b44e76d5cfdaf7dda3 (diff) | |
| download | emacs-b787d5501bad8036016d835faa2f90bb0904c038.tar.gz emacs-b787d5501bad8036016d835faa2f90bb0904c038.zip | |
More format-time-string change fixups
* lisp/net/tramp-sh.el (tramp-sh-handle-set-file-times):
* lisp/org/org.el (org-timestamp-format):
Fix doc to match new format-time-string behavior.
* lisp/org/ox-icalendar.el (org-icalendar-convert-timestamp):
Use (not (not X)) to treat non-nil values of utc arg as UTC.
| -rw-r--r-- | lisp/net/tramp-sh.el | 2 | ||||
| -rw-r--r-- | lisp/org/org.el | 9 | ||||
| -rw-r--r-- | lisp/org/ox-icalendar.el | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5b9083203b5..aa0ac022f03 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -1525,7 +1525,7 @@ of." | |||
| 1525 | (current-time) | 1525 | (current-time) |
| 1526 | time)) | 1526 | time)) |
| 1527 | ;; With GNU Emacs, `format-time-string' has an | 1527 | ;; With GNU Emacs, `format-time-string' has an |
| 1528 | ;; optional parameter UNIVERSAL. This is preferred, | 1528 | ;; optional parameter ZONE. This is preferred, |
| 1529 | ;; because we could handle the case when the remote | 1529 | ;; because we could handle the case when the remote |
| 1530 | ;; host is located in a different time zone as the | 1530 | ;; host is located in a different time zone as the |
| 1531 | ;; local host. | 1531 | ;; local host. |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 6e7d54d39c0..d2b48a64e45 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -22663,7 +22663,7 @@ contains commented lines. Otherwise, comment them." | |||
| 22663 | "Non-nil when TIMESTAMP has a time specified." | 22663 | "Non-nil when TIMESTAMP has a time specified." |
| 22664 | (org-element-property :hour-start timestamp)) | 22664 | (org-element-property :hour-start timestamp)) |
| 22665 | 22665 | ||
| 22666 | (defun org-timestamp-format (timestamp format &optional end utc) | 22666 | (defun org-timestamp-format (timestamp format &optional end zone) |
| 22667 | "Format a TIMESTAMP element into a string. | 22667 | "Format a TIMESTAMP element into a string. |
| 22668 | 22668 | ||
| 22669 | FORMAT is a format specifier to be passed to | 22669 | FORMAT is a format specifier to be passed to |
| @@ -22672,8 +22672,9 @@ FORMAT is a format specifier to be passed to | |||
| 22672 | When optional argument END is non-nil, use end of date-range or | 22672 | When optional argument END is non-nil, use end of date-range or |
| 22673 | time-range, if possible. | 22673 | time-range, if possible. |
| 22674 | 22674 | ||
| 22675 | When optional argument UTC is non-nil, time will be expressed as | 22675 | The optional ZONE is omitted or nil for Emacs local time, t for |
| 22676 | Universal Time." | 22676 | Universal Time, `wall' for system wall clock time, or a string as in |
| 22677 | `set-time-zone-rule' for a time zone rule." | ||
| 22677 | (format-time-string | 22678 | (format-time-string |
| 22678 | format | 22679 | format |
| 22679 | (apply 'encode-time | 22680 | (apply 'encode-time |
| @@ -22683,7 +22684,7 @@ Universal Time." | |||
| 22683 | (if end '(:minute-end :hour-end :day-end :month-end :year-end) | 22684 | (if end '(:minute-end :hour-end :day-end :month-end :year-end) |
| 22684 | '(:minute-start :hour-start :day-start :month-start | 22685 | '(:minute-start :hour-start :day-start :month-start |
| 22685 | :year-start))))) | 22686 | :year-start))))) |
| 22686 | utc)) | 22687 | zone)) |
| 22687 | 22688 | ||
| 22688 | (defun org-timestamp-split-range (timestamp &optional end) | 22689 | (defun org-timestamp-split-range (timestamp &optional end) |
| 22689 | "Extract a timestamp object from a date or time range. | 22690 | "Extract a timestamp object from a date or time range. |
diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el index 0d34ba19f45..cd54d1ee8de 100644 --- a/lisp/org/ox-icalendar.el +++ b/lisp/org/ox-icalendar.el | |||
| @@ -393,7 +393,8 @@ Universal Time, ignoring `org-icalendar-date-time-format'." | |||
| 393 | ;; Convert timestamp into internal time in order to use | 393 | ;; Convert timestamp into internal time in order to use |
| 394 | ;; `format-time-string' and fix any mistake (i.e. MI >= 60). | 394 | ;; `format-time-string' and fix any mistake (i.e. MI >= 60). |
| 395 | (encode-time 0 mi h d m y) | 395 | (encode-time 0 mi h d m y) |
| 396 | (or utc (and with-time-p (org-icalendar-use-UTC-date-time-p))))))) | 396 | (not (not (or utc (and with-time-p |
| 397 | (org-icalendar-use-UTC-date-time-p))))))))) | ||
| 397 | 398 | ||
| 398 | (defun org-icalendar-dtstamp () | 399 | (defun org-icalendar-dtstamp () |
| 399 | "Return DTSTAMP property, as a string." | 400 | "Return DTSTAMP property, as a string." |