summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacsconf.el25
1 files changed, 25 insertions, 0 deletions
diff --git a/emacsconf.el b/emacsconf.el
index c44ec89..3d3dc6f 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -1067,6 +1067,31 @@ The subheading should match `emacsconf-abstract-heading-regexp'."
time
emacsconf-timezone))))
+(defun emacsconf-convert-to-timezone (timezone time)
+ (interactive (list (progn
+ (require 'tzc)
+ (if (and (derived-mode-p 'org-mode)
+ (org-entry-get (point) "TIMEZONE"))
+ (completing-read (format "To zone (%s): "
+ (org-entry-get (point) "TIMEZONE"))
+ tzc-time-zones nil nil nil nil
+ (org-entry-get (point) "TIMEZONE"))
+ (completing-read "To zone: " tzc-time-zones nil t)))
+ (read-string "Time: ")))
+ (let* ((time
+ (date-to-time
+ (concat emacsconf-date "T" (string-pad time 5 ?0 t) ":00.000"
+ emacsconf-timezone-offset))))
+ (message "%s = %s"
+ (format-time-string
+ "%b %d %H:%M %z"
+ time
+ emacsconf-timezone)
+ (format-time-string
+ "%b %d %H:%M %z"
+ time
+ timezone))))
+
(defun emacsconf-timezone-set (timezone)
"Set the timezone for the current Org entry."
(interactive