Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NTP setup 1

Status
Not open for further replies.

rouse01

IS-IT--Management
Sep 10, 2001
143
US
Can anybody tell me what to check that would cause my system clock to display +6 hours ahead of my hardware clock?

After chasing many threads on ntp setup, finally just used the ntp.conf from
with always same results - system clock gets moved
forward 6 hours. The hardware clock is correct, however.

Here's what I'm doing:
#/etc/init.d/ntpd stop

# hwclock
Tue 16 Nov 2004 11:25:45 PM UTC 0.213191 seconds

# date -s "23:26:00 November 16 2004"
Tue Nov 16 23:26:00 UTC 2004

#/etc/init.d/ntpd start
#watch ntpdc -p -n

# date
Wed Nov 17 05:27:45 UTC 2004


My /etc/sysconfig/clock:
ZONE-"America/Chicago"
UTC=true
ARC=false

Thanks - Keith
 
The TZ setting in your environment will affect the display of time. Try this: 'TZ=CST6CDT date' (chicago is in central isn't it? Otherwise EDT5EDT)

If that makes the date display correctly then set TZ in your .profile or whatever is appropriate.
 
ericbrunson - Your suggestion "TZ=..." DOES return the correct time, I don't have a .profile, only a /etc/profile. So if this is the fix, I'm not sure of the syntax to enter in my /etc/profile. Is there a way to check the default timezone for the system?

franklin97355 = I believe UTC replaced GMT. Not sure if this is relavant but "UTC" is prominent in my listings. If you type 'date' in the terminal, do you get 'GMT' instead of 'UTC'?

Thanks for helping on this.
Keith
 
UTC is the same as GMT, but is the international standard for naming.

rouse01,

Create a file called '.profile' in your home directory and put the directives:

TZ=whatever
export TZ

This will work for bourne shell derivative shells, like sh, bash, ksh, zsh.

If you are using a csh derivative (csh, tcsh) then the syntax is different and the filename is different. You are condemned to having to figure it out yourself as penance for using a bastard shell.
 
UTC is the same as GMT, but is the international standard for naming.

rouse01,

Create a file called '.profile' in your home directory and put the directives:

TZ=whatever
export TZ

This will work for bourne shell derivative shells, like sh, bash, ksh, zsh.

If you are using a csh derivative (csh, tcsh) then the syntax is different and the filename is different. You are condemned to having to figure it out yourself as penance for using a bastard shell.
 
Thanks ericbrunson. I created the .profile in the root folder as suggested. For the heck of it, I also entered the commands at the console & the "date" command now shows correct time.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top