diff options
author | Jason Rumney <jasonr@gnu.org> | 2007-10-30 21:25:32 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2007-10-30 21:25:32 +0000 |
commit | 36d4b1454480775205a664c0d5f3677db9296649 (patch) | |
tree | 3f38c82f6ba4535cc6cc53b5b09447555d43dc52 /lisp/time.el | |
parent | a7580c1c8f1265e4da94603b1418e26e2cac24c4 (diff) |
(display-time-world-list): Test for zoneinfo support.
Diffstat (limited to 'lisp/time.el')
-rw-r--r-- | lisp/time.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/time.el b/lisp/time.el index e2c98910a3b..ef98c6a7819 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -150,9 +150,17 @@ LABEL is a string to display as the label of that TIMEZONE's time." :version "23.1") (defcustom display-time-world-list - (if (memq 'system-type '(gnu/linux ms-dos)) - zoneinfo-style-world-list - legacy-style-world-list) + ;; Determine if zoneinfo style timezones are supported by testing that + ;; America/New York and Europe/London return different timezones. + (let (gmt nyt) + (set-time-zone-rule "America/New York") + (setq nyt (format-time-string "%z")) + (set-time-zone-rule "Europe/London") + (setq gmt (format-time-string "%z")) + (set-time-zone-rule nil) + (if (string-equal nyt gmt) + legacy-style-world-list + zoneinfo-style-world-list)) "Alist of time zones and places for `display-time-world' to display. Each element has the form (TIMEZONE LABEL). TIMEZONE should be in the format supported by `set-time-zone-rule' on |