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

Re: Time in Emacs status bar



Johann Spies wrote:
> When emacs show the time in the status bar, the time zone is not correct.

Is it correct when you ask for it directly?  What is this output?

  $ date

  $ date -R

Do you have TZ set?

  echo $TZ

> I have tried to correct it by putting this in ~/.emacs:
> 
> (set-time-zone-rule "GMT+2")
> (setq display-time-day-and-date t
>                 display-time-24hr-format t)
> (display-time)

I suggest fixing it at the system level not in each application.
There are too many applications to play fixup with each one
individually.  (And I am also an emacs user.)

> But for example the time now is 16:00 in our time zone but emacs shows
> 12:00.
> 
> How do I convince emacs to use the same time zone info as the system?

If you have TZ set then I would unset it and fix the system.  (The TZ
variable is useful when sharing a remote system with multiple users in
different timezones.)

  unset TZ

To fix it reconfigure the tzdata package.  Select your timezone.

  # dpkg-reconfigure tzdata

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: