Browse Source

Initialize time zone from environment

Carsten Dominik 16 years ago
parent
commit
e15ada501b
2 changed files with 7 additions and 2 deletions
  1. 3 0
      lisp/ChangeLog
  2. 4 2
      lisp/org-icalendar.el

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2009-05-08  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-icalendar.el (org-icalendar-timezone): Initialize from
+	environment.
+
 	* org-html.el (org-format-org-table-html): Specify the scope.
 	(org-format-table-table-html): Specify the scope.
 	(org-export-table-header-tags): Prepare the scope parameter.

+ 4 - 2
lisp/org-icalendar.el

@@ -135,11 +135,13 @@ or if they are only using it locally."
   :group 'org-export-icalendar
   :type 'boolean)
 
-(defcustom org-icalendar-timezone ""
+(defcustom org-icalendar-timezone (getenv "TZ")
   "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)
+  :type '(choice
+	  (const :tag "Unspecified" nil)
+	  (string :tag "Time zone")))
 
 ;;; iCalendar export