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.
This commit is contained in:
parent
13c8f29ce3
commit
b787d5501b
3 changed files with 8 additions and 6 deletions
|
@ -1525,7 +1525,7 @@ of."
|
||||||
(current-time)
|
(current-time)
|
||||||
time))
|
time))
|
||||||
;; With GNU Emacs, `format-time-string' has an
|
;; With GNU Emacs, `format-time-string' has an
|
||||||
;; optional parameter UNIVERSAL. This is preferred,
|
;; optional parameter ZONE. This is preferred,
|
||||||
;; because we could handle the case when the remote
|
;; because we could handle the case when the remote
|
||||||
;; host is located in a different time zone as the
|
;; host is located in a different time zone as the
|
||||||
;; local host.
|
;; local host.
|
||||||
|
|
|
@ -22663,7 +22663,7 @@ contains commented lines. Otherwise, comment them."
|
||||||
"Non-nil when TIMESTAMP has a time specified."
|
"Non-nil when TIMESTAMP has a time specified."
|
||||||
(org-element-property :hour-start timestamp))
|
(org-element-property :hour-start timestamp))
|
||||||
|
|
||||||
(defun org-timestamp-format (timestamp format &optional end utc)
|
(defun org-timestamp-format (timestamp format &optional end zone)
|
||||||
"Format a TIMESTAMP element into a string.
|
"Format a TIMESTAMP element into a string.
|
||||||
|
|
||||||
FORMAT is a format specifier to be passed to
|
FORMAT is a format specifier to be passed to
|
||||||
|
@ -22672,8 +22672,9 @@ FORMAT is a format specifier to be passed to
|
||||||
When optional argument END is non-nil, use end of date-range or
|
When optional argument END is non-nil, use end of date-range or
|
||||||
time-range, if possible.
|
time-range, if possible.
|
||||||
|
|
||||||
When optional argument UTC is non-nil, time will be expressed as
|
The optional ZONE is omitted or nil for Emacs local time, t for
|
||||||
Universal Time."
|
Universal Time, `wall' for system wall clock time, or a string as in
|
||||||
|
`set-time-zone-rule' for a time zone rule."
|
||||||
(format-time-string
|
(format-time-string
|
||||||
format
|
format
|
||||||
(apply 'encode-time
|
(apply 'encode-time
|
||||||
|
@ -22683,7 +22684,7 @@ Universal Time."
|
||||||
(if end '(:minute-end :hour-end :day-end :month-end :year-end)
|
(if end '(:minute-end :hour-end :day-end :month-end :year-end)
|
||||||
'(:minute-start :hour-start :day-start :month-start
|
'(:minute-start :hour-start :day-start :month-start
|
||||||
:year-start)))))
|
:year-start)))))
|
||||||
utc))
|
zone))
|
||||||
|
|
||||||
(defun org-timestamp-split-range (timestamp &optional end)
|
(defun org-timestamp-split-range (timestamp &optional end)
|
||||||
"Extract a timestamp object from a date or time range.
|
"Extract a timestamp object from a date or time range.
|
||||||
|
|
|
@ -393,7 +393,8 @@ Universal Time, ignoring `org-icalendar-date-time-format'."
|
||||||
;; Convert timestamp into internal time in order to use
|
;; Convert timestamp into internal time in order to use
|
||||||
;; `format-time-string' and fix any mistake (i.e. MI >= 60).
|
;; `format-time-string' and fix any mistake (i.e. MI >= 60).
|
||||||
(encode-time 0 mi h d m y)
|
(encode-time 0 mi h d m y)
|
||||||
(or utc (and with-time-p (org-icalendar-use-UTC-date-time-p)))))))
|
(not (not (or utc (and with-time-p
|
||||||
|
(org-icalendar-use-UTC-date-time-p)))))))))
|
||||||
|
|
||||||
(defun org-icalendar-dtstamp ()
|
(defun org-icalendar-dtstamp ()
|
||||||
"Return DTSTAMP property, as a string."
|
"Return DTSTAMP property, as a string."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue