summaryrefslogtreecommitdiffstats
path: root/emacsconf.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacsconf.el')
-rw-r--r--emacsconf.el25
1 files changed, 23 insertions, 2 deletions
diff --git a/emacsconf.el b/emacsconf.el
index ddcee94..d4311da 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -40,11 +40,11 @@
:type 'directory)
-(defcustom emacsconf-timezone "America/Toronto" "Main timezone."
+(defcustom emacsconf-timezone "US/Eastern" "Main timezone."
:group 'emacsconf
:type 'string)
-(defcustom emacsconf-timezones '("America/Toronto" "America/Los_Angeles" "UTC" "Europe/Paris" "Europe/Athens" "Asia/Kolkata" "Asia/Singapore" "Asia/Tokyo") "List of timezones."
+(defcustom emacsconf-timezones '("US/Eastern" "US/Central" "US/Mountain" "US/Pacific" "UTC" "Europe/Paris" "Europe/Athens" "Asia/Kolkata" "Asia/Singapore" "Asia/Tokyo") "List of timezones."
:group 'emacsconf
:type '(repeat string))
@@ -210,6 +210,7 @@
(:email "EMAIL")
(:caption-note "CAPTION_NOTE")
(:availability "AVAILABILITY")
+ (:timezone "TIMEZONE")
(:q-and-a "Q_AND_A")
(:bbb-room "ROOM")
(:irc "IRC")
@@ -662,6 +663,26 @@ Include some other things, too, such as emacsconf-year, title, name, email, url,
(format-time-string "%z" (date-to-time emacsconf-date) emacsconf-timezone)
"Timezone offset for `emacsconf-timezone' on `emacsconf-date'.")
+(defun emacsconf-timezone-strings (o)
+ (let* ((timestamp (org-timestamp-from-string (plist-get o :scheduled)))
+ (start (org-timestamp-to-time (org-timestamp-split-range timestamp)))
+ (end (org-timestamp-to-time (org-timestamp-split-range timestamp t))))
+ (mapcar
+ (lambda (tz)
+ (if (string= tz "UTC")
+ (format "%s - %s "
+ (format-time-string "%A, %b %-e %Y, ~%-l:%M %p"
+ start tz)
+ (format-time-string "%-l:%M %p %Z"
+ end tz))
+ (format "%s - %s (%s)"
+ (format-time-string "%A, %b %-e %Y, ~%-l:%M %p"
+ start tz)
+ (format-time-string "%-l:%M %p %Z"
+ end tz)
+ tz)))
+ emacsconf-timezones)))
+
(defun emacsconf-convert-from-timezone (timezone time)
(interactive (list (completing-read "From zone: " tzc-time-zones)
(read-string "Time: ")))