[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e0ca8f7 6/9: Prefer format-time-string to current-time-zone
From: |
Paul Eggert |
Subject: |
master e0ca8f7 6/9: Prefer format-time-string to current-time-zone |
Date: |
Thu, 16 Dec 2021 14:17:37 -0500 (EST) |
branch: master
commit e0ca8f791c2e4396f1e40d86c136ae547b40185d
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>
Prefer format-time-string to current-time-zone
* lisp/org/ox-icalendar.el (org-icalendar-template)
(org-icalendar-export-current-agenda)
(org-icalendar--combine-files):
* lisp/time.el (display-time-update):
Prefer (format-time-string "%Z") to (cadr (current-time-zone)).
---
lisp/org/ox-icalendar.el | 7 +++----
lisp/time.el | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el
index 16c3dc9..211d0f7 100644
--- a/lisp/org/ox-icalendar.el
+++ b/lisp/org/ox-icalendar.el
@@ -824,8 +824,7 @@ as a communication channel."
(if (not (plist-get info :with-author)) ""
(org-export-data (plist-get info :author) info))
;; Timezone.
- (if (org-string-nw-p org-icalendar-timezone) org-icalendar-timezone
- (cadr (current-time-zone)))
+ (or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z"))
;; Description.
(org-export-data (plist-get info :title) info)
contents))
@@ -972,7 +971,7 @@ This function assumes major mode for current buffer is
(org-icalendar--vcalendar
org-icalendar-combined-name
user-full-name
- (or (org-string-nw-p org-icalendar-timezone) (cadr (current-time-zone)))
+ (or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z"))
org-icalendar-combined-description
contents)))
(run-hook-with-args 'org-icalendar-after-save-hook file)))
@@ -995,7 +994,7 @@ FILES is a list of files to build the calendar from."
user-full-name
;; Timezone.
(or (org-string-nw-p org-icalendar-timezone)
- (cadr (current-time-zone)))
+ (format-time-string "Z"))
;; Description.
org-icalendar-combined-description
;; Contents.
diff --git a/lisp/time.el b/lisp/time.el
index fcea064..b67315c 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -355,7 +355,7 @@ update which can wait for the next redisplay."
(am-pm (if (>= hour 12) "pm" "am"))
(minutes (substring time 14 16))
(seconds (substring time 17 19))
- (time-zone (car (cdr (current-time-zone now))))
+ (time-zone (format-time-string "%Z" now))
(day (substring time 8 10))
(year (format-time-string "%Y" now))
(monthname (substring time 4 7))
- master updated (e726a00 -> 9e131f5), Paul Eggert, 2021/12/16
- master cea0d61 4/9: Prefer format-time-string to current-time-string, Paul Eggert, 2021/12/16
- master e0ca8f7 6/9: Prefer format-time-string to current-time-zone,
Paul Eggert <=
- master 73d6b19 8/9: Omit temporary warning re obsolete timestamps, Paul Eggert, 2021/12/16
- master 34e3ad5 1/9: Fix encode-time doc string, Paul Eggert, 2021/12/16
- master fc520f8 5/9: Minor nndiary simplificatiuon with time zone, Paul Eggert, 2021/12/16
- master 3e6c69de 2/9: Fix icalendar time zone parsing glitch, Paul Eggert, 2021/12/16
- master dd0727e 3/9: encode-time simplifications, Paul Eggert, 2021/12/16
- master f25ad39 7/9: Assume current-time-zone exists, Paul Eggert, 2021/12/16
- master 9e131f5 9/9: Simplify epa-ks--parse-buffer timestamp handling, Paul Eggert, 2021/12/16