diff options
| author | Sacha Chua <sacha@sachachua.com> | 2022-10-09 21:22:27 -0400 | 
|---|---|---|
| committer | Sacha Chua <sacha@sachachua.com> | 2022-10-09 21:22:27 -0400 | 
| commit | ce31fd4c48271fca07ae37bbde87b540cf6493a9 (patch) | |
| tree | da15e44b3df0d2cfdabc5f47ee616f340d12d0be | |
| parent | 49cdc0047fbe0119bb197724bd5cb9dbfeda7132 (diff) | |
| download | emacsconf-el-ce31fd4c48271fca07ae37bbde87b540cf6493a9.tar.xz emacsconf-el-ce31fd4c48271fca07ae37bbde87b540cf6493a9.zip  | |
Timezone-related changes
| -rw-r--r-- | emacsconf-publish.el | 13 | ||||
| -rw-r--r-- | emacsconf.el | 25 | 
2 files changed, 23 insertions, 15 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el index 9d60fb8..f1d4b96 100644 --- a/emacsconf-publish.el +++ b/emacsconf-publish.el @@ -721,19 +721,6 @@ Entries are sorted chronologically, with different tracks interleaved."                              cancelled "\n"))         "")))) -(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) -       (format "%s - %s" -               (format-time-string "%A, %b %e %Y, ~%l:%M %p" -                                   start tz) -               (format-time-string "%l:%M %p %Z" -                                   end tz))) -     emacsconf-timezones))) -  (defun emacsconf-make-protected-index (filename)    (interactive (list (expand-file-name "index.html" emacsconf-protected-media-directory)))     (setq emacsconf-info (emacsconf-get-talk-info)) 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: ")))  | 
