emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Make display-time-mode time zone configurable


From: W . Greenhouse
Subject: Re: [PATCH] Make display-time-mode time zone configurable
Date: Tue, 16 Feb 2016 14:33:57 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux)

Paul Eggert <address@hidden> writes:

> Mark Oteiza wrote:
>> +(defcustom display-time-zone nil
>> +  "Variable specifying the time zone used in `display-time-string-forms'.
>> +See the function `format-time-string' for an explanation of
>> +its ZONE variable."
>> +  :type '(choice (const :tag "Emacs Local Time" nil)
>> +                 (const :tag "Universal Time" t)
>> +                 (const :tag "System Wall Clock Time" wall)
>> +                 (string "Time Zone Rule"))
>> +  :link '(function-link format-time-string)
>> +  :group 'display-time)
>
> This new defcustom seems to duplicate some or all of the existing
> defcustom time-stamp-time-zone. Should there be just custom var? or if
> there should be two, how should they differ in operation?

The purpose of these seems a bit different.
`display-time' is for the user to have a wall clock in the
privacy of their own Emacs; the `time-stamp' package, as I understand,
is for adding timestamped notes to files,
which one is probably sharing with others
(and a collaborative project might have some convention
about what time zone should be used for recording activity).
So they don't really do the same job,
and it's a good idea for the user to be able to set them differently.

Also, as far as parts of Emacs that deal with time zones,
there's also `calendar-time-zone', which uses a totally different
format (offset in minutes, instead of zoneinfo-style names)!
The calendar also seems to NIH the handling of daylight saving time.

Mark submitted this patch after a conversation we had on IRC
about how, despite the recent addition of timezone support to
`format-time-string', it was still difficult without bad kludges
for me to get a local wall clock on an Emacs whose system
time had to remain UTC.

It might not be desirable for various reasons to alter the "TZ"
environment variable for Emacs, which would propagate itself to all
subprocesses run by Emacs, and it might also not be right to
change the zone with `set-time-zone-rule', which would e.g. result
in sending out emails as local time, not UTC.

Now that I understand the role of `display-time-string-forms',
I can fix the problem for myself there without Mark's proposed
defcustom, but the defcustom raises visibility a lot for others
who might have the same desired wall-clock configuration as I.




reply via email to

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