LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   time of day problem (https://www.linuxquestions.org/questions/mandriva-30/time-of-day-problem-157280/)

gw1500se 03-13-2004 07:20 PM

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.

druuna 03-14-2004 06:01 AM

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.

ickselglic 03-14-2004 07:23 AM

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.

gw1500se 03-14-2004 01:04 PM

Thanks for the info. I'll give ti a try.

BTW, I found the NTP rpm for Makdrake.

johnnyLongside 03-19-2004 06:36 PM

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?

kyrian 03-19-2004 10:27 PM

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!

gw1500se 03-20-2004 07:58 AM

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.

NewtonMan 03-22-2004 11:41 AM

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

gw1500se 03-23-2004 02:03 AM

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.

NewtonMan 03-23-2004 09:25 AM

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!


All times are GMT -5. The time now is 01:37 PM.