unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: TZ ignored by (display-time)
@ 2008-03-14 17:09 Jason Rumney
  2008-03-14 21:26 ` James Cloos
  2008-03-14 23:54 ` Jason Rumney
  0 siblings, 2 replies; 3+ messages in thread
From: Jason Rumney @ 2008-03-14 17:09 UTC (permalink / raw)
  To: 14; +Cc: emacs-pretest-bug@gnu.org

> (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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-14 23:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 17:09 TZ ignored by (display-time) Jason Rumney
2008-03-14 21:26 ` James Cloos
2008-03-14 23:54 ` Jason Rumney

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).