LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices

Reply
 
Search this Thread
Old 03-13-2004, 07:20 PM   #1
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 220

Rep: Reputation: 30
time of day problem


I just installed 9.2 and have a problem with the time of day. Although it appears I have the correct time zone specified (ET), the time is off by 5 hours. Do I have to specify somewhere that the hardware clock is local time rather then GMT or is there something else I'm missing?

P.S. Isn't NTP part of Mandrake?

TIA.
 
Old 03-14-2004, 06:01 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
I don't know if ntp is part of Mandrake, but if it is it will not correct a 5 hour gap. It's just to big. You need to set the time close to the current time and after that ntp will keep it correct.

These 2 files are important for time issues:

/etc/localtime
This could be a link to you timezonefile, something like: /usr/share/zoneinfo/Europe/Amsterdam, some distro's copy the file to /etc/localtime instead of linking it.

/etc/sysconfig/clock
Here your localtime (bios=gmt or bios is local) is stored. I cannot tell you the exact layout of the file, it's done differently by different distro's. Maybe there's some comments included that can help you. Most seem to use UTC=1 or UTC=0. 1 being GMT, 0 being localtime.

The best setting for your bios is gmt, but most (ex)windows users have it set to localtime. If yours is set to localtime, make sure the parameter is set accordingly in the /etc/sysconfig/clock file.

Hope this helps.
 
Old 03-14-2004, 07:23 AM   #3
ickselglic
Member
 
Registered: Jan 2004
Posts: 90

Rep: Reputation: 15
Make sure when you are setting up the time that you put the time you need in military time (24 hours) example: 17:00 for 5 o clock. When you apply, mandrake will convert to 12 hours time.
 
Old 03-14-2004, 01:04 PM   #4
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 220

Original Poster
Rep: Reputation: 30
Thanks for the info. I'll give ti a try.

BTW, I found the NTP rpm for Makdrake.
 
Old 03-19-2004, 06:36 PM   #5
johnnyLongside
LQ Newbie
 
Registered: Mar 2004
Posts: 19

Rep: Reputation: 0
Question

I'm actually having the same trouble. I'm running Mandrake 9.1 on an imac g3. I used the hwclock commands to set the computers internal clock to the correct time, then set the mandrake clock to the correct time.
When I reboot the computer, however, the hwclock is still corect, but the mandrake clock is set six or seven hours in the past. I keep reseting my clock every time I log in. Any suggestions?
 
Old 03-19-2004, 10:27 PM   #6
kyrian
LQ Newbie
 
Registered: Feb 2004
Location: CA, USA
Distribution: Mandrake
Posts: 8

Rep: Reputation: 0
i've had 9.2 for awhile, and when i put the 2.6.3 kernel on, i got a similar problem... i put PST and i got a time three hours behind what PST should be. I wound up manually setting the clock but it isn't keeping good time, so if anyone knows whats up i'd appreciate it!
 
Old 03-20-2004, 07:58 AM   #7
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 220

Original Poster
Rep: Reputation: 30
I solved the problem by setting my hardware clock to GMT before 'druuna' replied. I then got the NTP RPM and set it up. Everything is fine now. I don't know if setting /etc/sysconfig/clock (UTC=false) will work as well but I have no reason to believe it wouldn't. But, being lazy, I haven't tried.
 
Old 03-22-2004, 11:41 AM   #8
NewtonMan
LQ Newbie
 
Registered: Oct 2003
Location: Wichita,KS
Distribution: Slackware, CPUBuilders
Posts: 25

Rep: Reputation: 15
My problem is quite similar, I have one question though. Which clock is more dependable? the hardware clock or the system clock? I have a box that is on a network with no access to the internet(no ntp updates), I was wondering if setting the system clock to the hardware clock would stay more accurate over a years time. This machine seems to lose a week to a week and a half a year down the road.

My thought was to have a script run like once a day to set the system clock to the hardware clock via cron. but wasn't sure if this was the most accurate way with out an outside server to update the time.

if you have any thoughts or comments this would be appreciated,
google.com/
Thanks
 
Old 03-23-2004, 02:03 AM   #9
gw1500se
Member
 
Registered: Mar 2004
Distribution: Mandriva 2010.0
Posts: 220

Original Poster
Rep: Reputation: 30
There is really only one clock. The system clock simply reads the hardware clock and converts it to local time as configured. Its accuracy depends on how good yoru hardware is. Typically, I have found hardware clocks to be fair to poor.

As a side issue, I tried drunna's suggestion but the setting of UTC in /etc/sysconfig/clock didn't seem to matter. I went back to setting the hardware clock to GMT and all's well.
 
Old 03-23-2004, 09:25 AM   #10
NewtonMan
LQ Newbie
 
Registered: Oct 2003
Location: Wichita,KS
Distribution: Slackware, CPUBuilders
Posts: 25

Rep: Reputation: 15
That makes perfect sense, one is a hardware clock one is a software clock. I was just worried about this box, considering it has time sensitive information on it. This machine will also never see the Internet. I plan to sync up with an ntp server right before i put the box in place, then it will go no further then my internal network.

I've been looking around at suggestive time adjustment scripts to try and solve some of my problem. But I still haven't found a truly accurate way to read my time drift. My initial test suggested that I will be off by a little more then a week in one years time.

If I find a good fix, I'll repost for others.

Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow a user to use gaim only at a certain time of the day Menestrel Linux - Security 5 07-04-2005 12:30 AM
ISO - 5 Day Download Time Limit rrrssssss Mandriva 3 03-15-2005 06:47 AM
Limit time for a user per day davholla Linux - General 11 08-22-2004 02:14 PM
ls sometimes year sometimes the time of day suguru Linux - Software 1 02-18-2004 10:27 PM
contrlling login by day and time starx Linux - General 1 12-07-2003 03:24 PM


All times are GMT -5. The time now is 08:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration