Re: Problems with the Timezone
- From: Martin Burnicki <martin.burnicki@xxxxxxxxxxx>
- Date: Wed, 10 May 2006 22:02:27 +0200
Marvin,
Marvin Garcia wrote:
This is what i have en the ntp.conf file.[...]
Looks OK.
Look this again
root@snbntp0201 # date
Wed May 10 21:41:57 GMT 2006
root@snbntp0201 # date -u
Wed May 10 17:42:00 GMT 2006
root@snbntp0201 # echo $TZ
GMT-4
if you see my timezone var is set to GMT-4 (this is the one that
belongs to me location). the system date (Wed May 10 21:41:57 GMT
2006) should be (Wed May 10 17:42:00 GMT 2006) - 4 = Wed May 10
13:42:00 GMT 2006 not (Wed May 10 17:42:00 GMT 2006 )+ 4 = Wed May 10
21:41:57 GMT 2006, because my GMT is set to GMT-4.
As already mentioned in my other post, the old TZ thing works exactly the
other way round. If your local time is GMT - 4 hours (or let's better call
it UTC - 4 hours) then you must set the TZ environment variable to GMT4
because the definition is UTC = local time + TZ value. Just try:
date -u # returns UTC time
TZ=GMT4 date # displays UTC time - 4 hours
On my system is looks like this:
# date -u
Wed May 10 19:57:38 UTC 2006
# TZ=GMT4 date
Wed May 10 15:57:40 GMT 2006
I think the result is what you expect. However, "GMT" is a poor choice for
the abbreviation of the time zone name since it implies that the displayed
time is GMT, which in fact it isn't. Better use a abbreviation which is
associated to what you call your local time zone.
Anyway, using TZ this way is outdated and you should preferably configure
your time zone maybe as "America/Santo_Domingo", as Richard B. Gilbert
proposed in one of his posts.
Martin
--
Martin Burnicki
Meinberg Funkuhren
Bad Pyrmont
Germany
.
- Follow-Ups:
- Re: Problems with the Timezone
- From: Marvin Garcia
- Re: Problems with the Timezone
- From: Marvin Garcia
- Re: Problems with the Timezone
- References:
- Problems with the Timezone
- From: Marvin Garcia
- Re: Problems with the Timezone
- From: David J Taylor
- Re: Problems with the Timezone
- From: Marvin Garcia
- Re: Problems with the Timezone
- From: Martin Burnicki
- Re: Problems with the Timezone
- From: Marvin Garcia
- Re: Problems with the Timezone
- From: Martin Burnicki
- Re: Problems with the Timezone
- From: Marvin Garcia
- Problems with the Timezone
- Prev by Date: Re: Problems with the Timezone
- Next by Date: Re: Problems with the Timezone
- Previous by thread: Re: Problems with the Timezone
- Next by thread: Re: Problems with the Timezone
- Index(es):
Relevant Pages
|
|