View previous topic :: View next topic |
Author |
Message |
al3x n00b
Joined: 19 Jun 2002 Posts: 47
|
Posted: Thu Jul 04, 2002 11:11 pm Post subject: NTP question |
|
|
Whenever I run ntpdate [servername] to syncronize my clock, it always synchs an hour too early for my local time. My /etc/localtime file is symlinked to the proper region for my local time. What's the deal? |
|
Back to top |
|
|
delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Thu Jul 04, 2002 11:19 pm Post subject: |
|
|
What's CLOCK set to in /etc/rc.conf? _________________ I don't believe in witty sigs. |
|
Back to top |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Thu Jul 04, 2002 11:38 pm Post subject: |
|
|
What timezone does date show? Code: | nitro@flex nitro $ date
Thu Jul 4 18:37:36 CDT 2002 |
I'm in the central timezone (obviously). _________________ - Kyle Manna
Please, please SEARCH before posting.
There are three kinds of people in the world: those who can count, and those who can't. |
|
Back to top |
|
|
blarson n00b
Joined: 22 Jul 2002 Posts: 22
|
Posted: Thu Nov 21, 2002 9:20 pm Post subject: hrm... |
|
|
So... If it says that I'm using UTC... and I shouldn't be... Any thoughts?
Code: | root@redfox blarson # date
Thu Nov 21 21:15:17 UTC 2002
|
Code: | root@redfox blarson # ls -l /etc/localtime
lrwxrwxrwx 1 root root 30 Nov 21 21:05 /etc/localtime -> /usr/share/zoneinfo/US/Central
|
Code: | # Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time). If your clock is set to the local time, then set CLOCK
# to "local". This setting is used by the /etc/init.d/clock script.
CLOCK="local"
|
This just started happening a day or so ago... It should be in Central time, but is 6 hours fast instead. It probably happened because I booted into windows (the root of all evil ) to play some warcraft
Thanks!
-Brad |
|
Back to top |
|
|
jondkent Apprentice
Joined: 26 Jul 2002 Posts: 289 Location: London
|
Posted: Fri Nov 22, 2002 1:13 pm Post subject: |
|
|
Silly question, but are you sync'ing to a NTP server in your timezone?? |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Fri Nov 22, 2002 2:33 pm Post subject: |
|
|
blarson - Thanks for searching.
NTP servers always give you time in terms of UTC. You are six hours ahead because Central time is UTC -6 hours. I would just change your CLOCK variable to UTC and the system should use your timezone information to adjust the time by -6 hours. HTH.. _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
guero61 l33t
Joined: 14 Oct 2002 Posts: 811 Location: Behind you
|
Posted: Fri Nov 22, 2002 3:38 pm Post subject: |
|
|
Quote: | I would just change your CLOCK variable to UTC and the system should use your timezone information to adjust the time by -6 hours.
|
I would actually have to disagree with a Mod here...
My experience with NTP and system times is that you need CLOCK to say "local" and your /etc/localtime needs to point to your appropriate time zone. At least, that's what's worked for me, but things seem to scarily work just right for me the first time. |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Fri Nov 22, 2002 3:46 pm Post subject: |
|
|
guero61 wrote: | I would actually have to disagree with a Mod here... |
lol.. It's not that big of a deal. I certainly hope people don't feel afraid to post when they have differing opinions. I'll check my config when I get home and post what I have. _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
nikai Apprentice
Joined: 02 Oct 2002 Posts: 270 Location: Kitzbühel, Austria
|
Posted: Fri Nov 22, 2002 4:01 pm Post subject: |
|
|
guero61 wrote: | My experience with NTP and system times is that you need CLOCK to say "local" |
I'm in favor of "UTC". My timezone is CET, and this is working nicely for me, especially including changes of daylight saving time.
The only problem I encountered with "UTC" was dualbooting with Windows, because Windows always assumed your hwclock was running at local time. |
|
Back to top |
|
|
blarson n00b
Joined: 22 Jul 2002 Posts: 22
|
Posted: Fri Nov 22, 2002 6:18 pm Post subject: |
|
|
If possible, I would really like to keep my CLOCK set to local, because I use windows for games every once in a while. Maybe I can set windows to use UTC... I'll have to look into that.
But anyways, that doesn't solve my problem... it doesn't matter what the clock is set to, NTP always puts it 6 hours off and date says I am using UTC. I do have a sym link from /etc/localtime to my time file... I am thinking that my /usr/share/zoneinfo/US/Central file might be corrupt... Can I emerge baselayout to get a fresh one? or can someone post their /Central file?
Thanks for the help! |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Fri Nov 22, 2002 6:43 pm Post subject: |
|
|
Moved from OTG. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
masseya Bodhisattva
Joined: 17 Apr 2002 Posts: 2602 Location: Baltimore, MD
|
Posted: Sat Nov 23, 2002 2:05 am Post subject: |
|
|
In case anyone wants to know: Code: | # Set CLOCK to "UTC" if your system clock is set to UTC (also known as
# Greenwich Mean Time). If your clock is set to the local time, then set CLOCK
# to "local". This setting is used by the /etc/init.d/clock script.
CLOCK="UTC" |
Code: | bash $ date
Fri Nov 22 21:03:39 EST 2002 |
Code: | masseya@gandalf masseya $ ls -l /etc/localtime
lrwxrwxrwx 1 root root 40 Sep 20 12:37 /etc/localtime -> /usr/share/zoneinfo/America/Indianapolis |
Don't know if that helps any of the dual booters out there, but I thought I would post what I have as a working sample in case anyone needed it. _________________ if i never try anything, i never learn anything..
if i never take a risk, i stay where i am.. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sat Nov 23, 2002 2:36 am Post subject: |
|
|
So, you dual-boot with UTC? I was under the impression that with the UTC setting, time in MS Windows would be 1 hour off. Has been for me anyway. Perhaps I've chosen the wrong timezone for that option. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|