XK8ER
asked on
sync date with NTPd
hello,
I am on EST time using centos v5.7 and right now its 1.56pm I started the NTPd service
service ntpd start
chkconfig ntpd on
then I check and this is what I get
[(12:20 PM)][(root@critical)] [(~)] $ date
Sat Oct 1 12:56:03 EST 2011
how can I fix the date?
I am on EST time using centos v5.7 and right now its 1.56pm I started the NTPd service
service ntpd start
chkconfig ntpd on
then I check and this is what I get
[(12:20 PM)][(root@critical)] [(~)] $ date
Sat Oct 1 12:56:03 EST 2011
how can I fix the date?
ASKER
that doesnt change the time for the system, this is what I get.
You can make this change permanent for yourself by appending the line
TZ='America/New_York'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
America/New_York
[(01:23 PM)][(root@alpha)] [(~)] $ date
Sat Oct 1 13:23:50 EST 2011
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, the time is now correct.. now when the time changes into daylight saving.. would it change automatically?
Yes it will.
You may want to restart any applications that could have the old TZ cached. I have never changed the timezone on a server apart from during the install, so I'm not sure of the repercussions of doing it on the live system.
If you are able to reboot the machine, that would be the safest, but is probably unnecessary... your call on that.
You may want to restart any applications that could have the old TZ cached. I have never changed the timezone on a server apart from during the install, so I'm not sure of the repercussions of doing it on the live system.
If you are able to reboot the machine, that would be the safest, but is probably unnecessary... your call on that.
ASKER
I think crond would be the only service that needs to restart so that it can rotate the logs right at 4am.. other than that when I change the date its all good.
Change/confirm your timezone by using tzselect
Open in new window