Skip to content

Commit

Permalink
fix unrecognized tz name #5
Browse files Browse the repository at this point in the history
  • Loading branch information
md-arif-shaikh committed May 13, 2022
1 parent 3af821d commit 8fa2aa5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tzc.el
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
(defcustom tzc-favourite-time-zones-alist '(("Asia/Kolkata" "Kolkata")
("UTC+0000" "UTC")
("America/New_York" "New_York")
("UK/London" "London")
("Europe/London" "London")
("Europe/Berlin" "Berlin")
("Asia/Shanghai" "Shanghai")
("Asia/Tokyo" "Tokyo"))
Expand Down Expand Up @@ -404,5 +404,15 @@ See `tzc-world-clock'."
(align-regexp (point-min) (point-max) "\\(\\s-*\\) "))
(tzc-world-clock-mode))

(defun tzc-check-time-zone (time-zone)
"Check info for TIME-ZONE."
(interactive "sEnter Time Zone: ")
(if (member time-zone (tzc--get-time-zones))
(progn
(let* ((name (tzc--get-time-zone-label time-zone))
(offset (tzc--get-offset time-zone)))
(message "%s %s" name offset)))
(message "%s is not a recognized time zone name." time-zone)))

(provide 'tzc)
;;; tzc.el ends here

0 comments on commit 8fa2aa5

Please sign in to comment.