D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] BST instead of GMT

 

On Tuesday 28 March 2006 11:40 am, Philip Radford wrote:
> Apologies should have correctly stated that server is FreeBSD 5.4

:-) Every query should always mention the distro involved.

> date command outputs :-
> Tue Mar 28 10:33:48 GMT 2006

Try $ date -u

(and undo that change to the timezone, it's confusing things.)

> Whereas on another server running Redhat 9 it displays :-
> Tue Mar 28 11:35:36 BST 2006
>
> set | grep LANG does nothing. Maybe something freeBSD does not like.

Check the output of set. The command I gave just looks for a specific value. 
set should output a lot of other environment variables.

However, if LANG is not set, that is the basis of your problem. The server 
does not know where it is and the programmes cannot locate the language. 
You'll find that messages are all in en_US instead of en_GB, some programmes 
will print 03/28/2006 instead of 28/03/2006 etc.

> I will find out to how to check the locale on the server as sysintall the
> freebsd configuration menu only makes reference to timezone and not
> locales.

locales -> translation. Check for translation / language support.

> Although as I did not isntall the OS it is probably set to 
> something bizarre somewhere on the setup.

Unlikely to be bizarre - just not set, which will default to the C or POSIX 
environment which in turn becomes en_US with UTC time.

Note that UTC does *look* like GMT from our perspective but UTC is actually 
timezone neutral, whereas GMT is a timezone itself.

i.e. 11:00 in UTC is the same as 12:00 BST.

Therefore, your clock is probably correct - it's simply a localisation issue. 
The time within the machine won't change when you get the right locale, all 
that WILL change is HOW that time is displayed to you.

$ date -u
Tue Mar 28 10:52:05 UTC 2006

$date
Tue Mar 28 11:52:23 BST 2006

UTC is a special, universal, time. (Universal Coordinated Time, but called UTC 
instead of UCT due to the French, I think).

POSIX systems (should) all work in UTC time internally. Timezones are simply a 
layer on top of POSIX/UTC standards. If no timezone is set (because no locale 
is set), you get UTC and the default language, typically en_US, along with 
the default locale, also typically en_US.

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpxeTgvxrv2z.pgp
Description: PGP signature