Jelajahi Sumber

New variable `org-ical-timezone'.

Carsten Dominik 16 tahun lalu
induk
melakukan
8ac2704c26
2 mengubah file dengan 12 tambahan dan 1 penghapusan
  1. 3 0
      lisp/ChangeLog
  2. 9 1
      lisp/org-icalendar.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-05-06  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-icalendar.el (org-start-icalendar-file): Use the new option.
+	(org-ical-timezone): New option.
+
 	* org-exp.el (org-export-get-coderef-format): Use the description
 	is present.
 

+ 9 - 1
lisp/org-icalendar.el

@@ -135,6 +135,12 @@ or if they are only using it locally."
   :group 'org-export-icalendar
   :type 'boolean)
 
+(defcustom org-ical-timezone ""
+  "The time zone string for iCalendar export.
+When nil of the empty string, use the abbreviation retrived from Emacs."
+  :group 'org-export-icalendar
+  :type 'string)
+
 ;;; iCalendar export
 
 ;;;###autoload
@@ -496,7 +502,9 @@ not used right now."
   "Start an iCalendar file by inserting the header."
   (let ((user user-full-name)
 	(name (or name "unknown"))
-	(timezone (cadr (current-time-zone))))
+	(timezone (if (> length org-ical-timezone)
+		      org-ical-timezone
+		    (cadr (current-time-zone)))))
     (princ
      (format "BEGIN:VCALENDAR
 VERSION:2.0