View Full Version : System clock off by 7 hrs
mharvey87
March 12th, 2009, 07:11
I is 11:10 PM March 11 right now, when I use the date command it
returns 6:10 March 12.
I have set it up for Pacific time but I think it's confused. What can I do to fix this?
osx-addict
March 12th, 2009, 07:14
Do you have something like the following in your /etc/rc.conf :
ntpdate_flags="north-america.pool.ntp.org"
ntpdate_enable="YES"
mharvey87
March 12th, 2009, 07:23
no, tried adding it, still nothing
Mel_Flynn
March 12th, 2009, 07:42
I have set it up for Pacific time but I think it's confused.
Or perhaps you are. What is the full output of the date command (including the timezone bit).
mharvey87
March 12th, 2009, 07:45
Thu Mar 12 06:44:54 PDT 2009
Mel_Flynn
March 12th, 2009, 07:57
Execute as root:
date 200903112356.00
Your clock was off when you changed timezone, so it's still off.
mharvey87
March 12th, 2009, 08:03
That's weird, whatever number I use for the year with that command it sets the year to 2020.
Mel_Flynn
March 12th, 2009, 08:11
Sure you typed the dot ('.') to indicate the seconds? And 03 not 3? Works like a charm here:
% sudo date 200903112309.20
Wed Mar 11 23:09:20 AKDT 2009
% tail -1 /var/log/messages
Mar 11 23:09:20 laptop date: date set by mel
mharvey87
March 12th, 2009, 08:26
It worked that time, thanks. I still can't help wondering why it would be wrong in the first place though, I set it up for PDT during the installation.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.