emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TZ ignored by (display-time)


From: Jason Rumney
Subject: Re: TZ ignored by (display-time)
Date: Fri, 14 Mar 2008 17:09:57 +0000
User-agent: Thunderbird 2.0.0.12 (Windows/20080213)

(display-time) fails to take the contents of TZ into effect when
formatting the time string.


The problem seems to be caused by the new display-time-world functionality, so this bug shouldn't affect Emacs 22.

When time.el is loaded, the following code clobbers the internal timezone setting:

(defcustom display-time-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)




According to the documentation for set-time-zone-rule, it should set the timezone back to the local timezone when the argument is nil. But it doesn't seem to take note of the TZ environment variable when it does this.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]