bug-coreutils
[Top][All Lists]
Advanced

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

Re: Can't set the timezone for "date".


From: Bob Proulx
Subject: Re: Can't set the timezone for "date".
Date: Sat, 21 Jul 2007 12:06:11 -0600
User-agent: Mutt/1.5.9i

Alan Mackenzie wrote:
> I'm having problems with my date.  My system is basically Debian Sarge
> GNU/Linux.  uname -a gives this:

I have an obligatory response that says Etch is now current stable. :-)
This won't affect your issue though.

> What I would like to see printed is something like this:
>     Sat Jul 21 14:37:34 GMT 2007
> , though I'd be happy enough with "UTC" instead of "GMT".

Set it to UTC and you will see UTC.

> I'm not aware of exactly what it is on my system that decides to display
> dates with "BST".  The variable TZ was null.  I have tried setting TZ to
> "GMT", "UTC", "0000" and even "asdf", none of which makes the slightest
> difference.  I have tried "set | grep BST".

GNU libc ships with a script to help set the /etc/timezone file to the
desired timezone.  When glibc is installed or updated the postinst
script calls tzconfig and says: "Run 'tzconfig' if you wish to change
it."

  sudo tzconfig

> Earlier in the day I had changed my /etc/timezone file from
> "Europe/London" to "GMT" and rebooted.

Why did you reboot?

> This made not a blind bit of difference.

Since you were editing the file manually try "Etc/GMT" instead of
"GMT" and it should behave as you expect.  However I suggest using
"UTC" instead of "GMT", as in "Etc/UTC".

But actually probably better to run 'tzconfig' to do this for you
since that will protect against typographic errors.

> Is there some dstardly setting somewhere which I haven't set, and
> has decided I really want "Summer Time" (aka daylight saving time)?

This is really a better question for address@hidden than
bug-coreutils.

> I can't find anything at all int the info file for date, sh-utils.info,
> "This manual minimally documents version 1.16 of the GNU shell
> utilities" about setting timezones.  I think this is a bug of omission
> in the manual.  

That manual should not exist on a Sarge system.  That is the Woody
version of the manual.  The new manual is in the coreutils.info file.

But this has nothing to do with coreutils and everything to do with
glibc.

> Also, my CMOS clock seems to have gained about half an hour over the
> last year.  Looking at various scripts in rc[0123456S].d, it seems that
> Debian Linux overwrites the CMOS clock every time it shuts down.  Damned
> arrogance that, if you ask me!  I'm confused as to why this is done, and
> feeling pretty fed up about it.  As a bonus, if anybody can explain to
> me what's going on here, I'd be very grateful.

That is normal.  But please ask that question again on
address@hidden mailing list instead of here.

> Also, is there _any_ pertinent documentation of all this stuff anywhere?
> Any info file or man page that documents TZ, for example?

  man tzconfig

Bob




reply via email to

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