# HG changeset patch # User Jason Rumney # Date 1193779497 0 # Node ID 05d1905f2a7a8a30fd308df2fe81aa94261ad2eb # Parent a69014d11d959022ac87aa63de5f90bb1a900848 (display-time-world-list): Test for zoneinfo support. diff -r a69014d11d95 -r 05d1905f2a7a lisp/time.el --- a/lisp/time.el Tue Oct 30 20:27:22 2007 +0000 +++ b/lisp/time.el Tue Oct 30 21:24:57 2007 +0000 @@ -150,9 +150,17 @@ :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