LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-23-2001, 06:08 AM   #1
minor
Member
 
Registered: May 2001
Location: HK
Distribution: Mandrake
Posts: 68

Rep: Reputation: 15
Unhappy clock problem


I have some problem setting the clock. I would like to set the linux system clock same as my hardware clock. But I found that the system clock auto +8 hours(ie actually 1:00 but the system show 9:00). And I using Suse 7.1 and I already checked the /etc/rc.config file and the GMT="" and Timeszone is /Asian/HONGKONG. And here are the boot log details, I have a problem why this file will show twice boot log time,

Inspecting /boot/System.map-2.2.18
Loaded 10080 symbols from /boot/System.map-2.2.18.
Symbols match kernel version 2.2.18.
Loaded 51 symbols from 1 module.
klogd 1.3-3, log source = ksyslog started.
<4>Linux version 2.2.18 (root@Pentium.suse.de) (gcc version 2.95.2 19991024 (release)) #1 Wed Jan 24 12:28:55 GMT 2001
<4>BIOS-provided physical RAM map:
<4> BIOS-e820: 0009f000 @ 00000000 (usable)
<4> BIOS-e820: 0ff00000 @ 00100000 (usable)
<4>Detected 448062 kHz processor.
<4>Console: colour VGA+ 80x25
<4>Calibrating delay loop... 894.56 BogoMIPS
<4>Memory: 256568k/262144k available (1668k kernel code, 408k reserved, 2972k data, 88k init, 0k bigmem)
<4>Dentry hash table entries: 32768 (order 6, 256k)
<4>Buffer cache hash table entries: 262144 (order 8, 1024k)
<4>Page cache hash table entries: 65536 (order 6, 256k)
<4>Inode hash table entries: 16384 (128k), inode-max: 16384
<5>VFS: Diskquotas version dquot_6.4.0 initialized
<6>Intel machine check architecture supported.
<6>Intel machine check reporting enabled on CPU#0.
<4>512K L2 cache (4 way)
<4>CPU: L2 Cache: 512K
<4>CPU: Intel Pentium III (Katmai) stepping 03
<6>Enabling fast FPU save and restore... done.
<6>Enabling unmasked SIMD FPU exception support... done.
<6>Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
<6>Checking 'hlt' instruction... OK.
<4>POSIX conformance testing by UNIFIX
<4>mtrr: v1.35a (19990819) Richard Gooch (rgooch@atnf.csiro.au)
<4>PCI: PCI BIOS revision 2.10 entry at 0xed720, last bus=1
<4>PCI: Using configuration type 1
<4>PCI: Probing PCI hardware
<6>Linux NET4.0 for Linux 2.2
<6>Based upon Swansea University Computer Society NET3.039
<6>NET4: Unix domain sockets 1.0 for Linux NET4.0.
<6>NET4: Linux TCP/IP 1.0 for NET4.0
<6>IP Protocols: ICMP, UDP, TCP, IGMP
<4>TCP: Hash tables configured (ehash 262144 bhash 65536)
<4>Initializing RT netlink socket
<4>Starting kswapd v 1.5
<6>Detected PS/2 Mouse Port.
<6>Serial driver version 4.27 with HUB-6 MANY_PORTS MULTIPORT SHARE_IRQ enabled
<6>ttyS00 at 0x03f8 (irq = 4) is a 16550A
<6>ttyS01 at 0x02f8 (irq = 3) is a 16550A
<4>pty: 256 Unix98 ptys configured
<6>Real Time Clock Driver v1.09
<4>RAM disk driver initialized: 16 RAM disks of 64000K size
<6>loop: registered device at major 7
<6>Uniform Multi-Platform E-IDE driver Revision: 6.30
<4>ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
<4>PIIX4: IDE controller on PCI bus 00 dev a1
<4>PIIX4: chipset revision 1
<4>PIIX4: not 100%% native mode: will probe irqs later
<4> ide0: BM-DMA at 0x1060-0x1067, BIOS settings: hdaMA, hdbio
<4> ide1: BM-DMA at 0x1068-0x106f, BIOS settings: hdcMA, hddio
<4>hda: Maxtor 52049H3, ATA DISK drive
<4>hdc: CD-ROM CDU4011, ATAPI CDROM drive
<4>ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
<4>ide1 at 0x170-0x177,0x376 on irq 15
<6>hda: Maxtor 52049H3, 19541MB w/2048kB Cache, CHS=2646/240/63
<4>hdc: ATAPI 40X CD-ROM drive, 120kB Cache
<6>Uniform CD-ROM driver Revision: 3.11
<6>Floppy drive(s): fd0 is 1.44M
<6>FDC 0 is a National Semiconductor PC87306
<6>LVM version 0.9 by Heinz Mauelshagen (13/11/2000)
<4>lvm -- Driver successfully initialized
<6>md driver 0.90.0 MAX_MD_DEVS=256, MAX_REAL=12
<6>linear personality registered
<6>raid0 personality registered
<6>raid1 personality registered
<6>raid5 personality registered
<6>raid5: measuring checksumming speed
<6>raid5: KNI detected, trying cache-avoiding KNI checksum routine
<4> pIII_kni : 895.350 MB/sec
<6>raid5: MMX detected, trying high-speed MMX checksum routines
<4> pII_mmx : 987.171 MB/sec
<4> p5_mmx : 1061.085 MB/sec
<4> 8regs : 777.621 MB/sec
<4> 32regs : 447.675 MB/sec
<4>using fastest function: pIII_kni (895.350 MB/sec)
<4>scsi : 0 hosts.
<4>scsi : detected total.
<4>md.c: sizeof(mdp_super_t) = 4096
<6>Partition check:
<6> hda: hda1 hda2 < hda5 hda6 hda7 >
<5>RAMDISK: Compressed image found at block 0
<4>Uncompressing...............................................................................don e.
<6>autodetecting RAID arrays
<4>autorun ...
<4>... autorun DONE.
<6>apm: BIOS not found.
<4>VFS: Mounted root (ext2 filesystem).
<6>usb.c: registered new driver usbdevfs
<6>usb.c: registered new driver hub
<6>autodetecting RAID arrays
<4>autorun ...
<4>... autorun DONE.
<4>VFS: Mounted root (ext2 filesystem) readonly.
<4>change_root: old root has d_count=1
<5>Trying to unmount old root ... okay
<4>Freeing unused kernel memory: 88k freed
<6>Adding Swap: 279680k swap-space (priority -1)
Kernel logging (ksyslog) stopped.
Kernel log daemon terminating.
Boot logging started at Thu Aug 23 17:46:34 2001
Activating swap-devices in /etc/fstab...
done
Checking file systems...
Parallelizing fsck version 1.19a (13-Jul-2000)
/dev/hda1: clean, 25614/1314144 files, 187663/2623312 blocks
/dev/hda5: clean, 80226/1128288 files, 295800/2254762 blocks
done
Setting up the CMOS clock done
Mounting local file systems...
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda5 on /usr type ext2 (rw)
done
Setting up loopback device done
Setting up hostname done
Configuring serial ports...
Configuring serial ports
done
Running /etc/init.d/boot.local
done
Creating /var/log/boot.msg
done
Enabling syn flood protection done
Disabling IP forwarding done
INIT: Entering runlevel: 3
Boot logging started at Fri Aug 24 01:46:44 2001
Master Resource Control: previous runlevel: N, switching to runlevel: 3
Starting personal-firewall (initial) [not active] unused
Initializing random number generator done
Setting up network device eth0
done
Setting up routing (using /etc/route.conf) done
Starting syslog services done
Starting service usbmgr done
Starting service at daemon: done
Loading keymap qwerty/us.map.gz
done
Loading compose table winkeys shiftctrl latin1.add done
Loading console font lat1-16.psfu
done
Loading unimap lat1u.uni
done
Setting up console ttys
done
Turning on quota:
done
Starting CRON daemon done
Starting console mouse support (gpm): done
Starting inetd done
Starting personal-firewall (final) [not active] unused
Master Resource Control: runlevel 3 has been reached

ps. I also have another linuxbox is same config, but haven't this problem. Thanks!
 
Old 08-23-2001, 04:34 PM   #2
mike L
Member
 
Registered: May 2001
Distribution: SuSE 10 (SLED)
Posts: 30

Rep: Reputation: 15
http://www.linuxquestions.org/questi...?threadid=4115

minor, don't know if this will help,but I had problems with my clock and ended up reinstalling Linux.
 
Old 09-13-2001, 05:56 PM   #3
mystery
LQ Newbie
 
Registered: Sep 2001
Posts: 1

Rep: Reputation: 0
Clock problem

I have a similar clock problem with Mandrake 8. When using KDE the clock resets itself. The time is 8 hours out of sync. When using Gnome it doesn't. The difference is that in KDE, power management is on. In Gnome, although power management is checked to be on, it doesn't work ie it doesn't power down.

When I reboot to Windows the time is changed there too.

Reinstalling Linux does not help.
 
Old 09-13-2001, 06:12 PM   #4
tfrye
Member
 
Registered: Dec 2000
Posts: 60

Rep: Reputation: 15
You know, I have the exact same problem, mystery. Have for quite some time. In fact, the only operating system I got that is not doing that is BeOS. Gotta love it.

I am not sure how to fix this problem, and if anyone knows, please post it.
 
Old 06-26-2002, 06:32 AM   #5
Muggins
LQ Newbie
 
Registered: Jun 2002
Location: Australia Victoria Somerville
Distribution: Mandrake
Posts: 3

Rep: Reputation: 0
I have the same problem (I think) M$ Windows 98 shows the correct date and time, (because it was set that way before Mandrake 8.2 was installed). Linux show +10 hrs (M$ time 20:25 Wed 26/6/02 , MDK time 06:25 27/6/02) this is correct as im in Australia ESTime (non summer). If I change MDK to UTC both System and HWclocks, the M$ clock get out of wack, tfrye and mystery problems. The Posted time shows 09:32 06/26/2002. (ok it took me 7 mins to type)

Last edited by Muggins; 06-26-2002 at 06:36 AM.
 
Old 06-26-2002, 10:51 PM   #6
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Muggins, boot into linux and change your time configuration setting from UTC to local time. Then boot into win98 and set the clock to the local time. Next, boot back into linux and see if the time is the correct local time. Boot back into win98 and check its time to see if it's correct.

When you select the UTC setting in linux, it applies the time zone offset to the time it reads from the hardware clock. In your case, it adds ten hours to the local time it read from the hardware clock. Making your linux time ten hours later.

If you select the local time setting, linux thinks that another operating system is taking care of the hardware clock and it doesn't add the offset to the time it reads from the hardware clock. So, your linux clock will display the correct local time.
 
Old 06-26-2002, 11:16 PM   #7
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
Linuxcool is correct. The time setting is nerfed by having UTC time set.

Linux typically works by keeping Greenwich Mean Time and then having an add function that calculates what the time is in your time zone as a result. If you switch back and forth from Linux to Windows, you are going to see a time differential of the number of hours you are from GMT.

If you use local time, you don't have that problem.

It's also tough to turn off by the way. A real pain.



Antother problem is having the clock display military or 24 hour time versus 12 hour time. That is easily changed in KDE by having the clock display with the %I (capital letter i) rather than %H format. To get there you right click on the clock and select the time and date format selection. Unfortunately, once changed it only changes in the kicker's clock when you logout and re- login.

Another pain. But less so.
 
Old 06-27-2002, 07:36 AM   #8
Muggins
LQ Newbie
 
Registered: Jun 2002
Location: Australia Victoria Somerville
Distribution: Mandrake
Posts: 3

Rep: Reputation: 0
Sorry Mates, I must be a real drongo. I for the life of me can not work out this bloody clock problem.
I use KDE clock to adjust the time to local
Go into Konsole SU and use
hwclock --systohc (set the HC to Sys clock)
hwclock --localtime (make HC use local (non UTC) time)
All looked good, Clocks, EMails etc used this time.

Re-Boot into M$ 98SE, adjust the time in Setting/Clock.
And guess what. SNAFU

Back into Linux and the time (KDE) is set back to 07:25 28/6/02 (10 hours in front)
I getting pissssssssed ooooooooooooorrrrffffffffff
 
Old 06-27-2002, 09:01 PM   #9
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Muggins, boot into linux and go into kde and run the program that sets up the time. Select your time zone and when asked to select UTC or local time, select local time. Save it and then boot into win98. Set the clock for local time and then boot into linux and see if the time is correct. Next, boot into win98 and check the time to see if it's correct. Don't run the hwclock commands. I hope this works this time.

I have win98se and Caldera on my box and I have it set for local time in linux and it works fine. win98se took care of the change to daylight savings time and linux just displayed what it read from the hardware clock.
 
Old 06-29-2002, 04:36 PM   #10
Half_Elf
LQ Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 46
I have a strange problem with my clock too, look like my Asus Mb Bios (asus motherboard are nice but their bios... pff awful) lost the clock time while I'm running Linux... Mandrake losts it every 30 sec (very boring to see the "clock timer config lost" msg every 30 sec in console) but Slackware look like to be better... Slack losts it every 2-3 minutes (and I don't have an annoying msg). So every 12h of use, my clock take a late of 5 min or so. I contact Asus and they said I have to flash my Bios with a newer version (I'm very afraid about this so I have not did it yet).

Maybe your problem is caused by a buggy Bios too
 
Old 12-07-2002, 11:53 AM   #11
dzhon
LQ Newbie
 
Registered: Oct 2002
Location: Denver, Colorado
Distribution: Slackware 9.0
Posts: 16

Rep: Reputation: 0
i am having a problem with the shutdown script hanging on shutdown when it tries to save system time to the hardware clock.
After installation of slack 8.1 everything was fine. However, after a week or so it started hanging on shutdown. If i comment out the following comment from /etc/rc.d/rc.6 it doesn't hang :
/sbin/hwclock --localtime --systohc

OR if i comment out the --systohc part it doesn't hang. of course it doesn't do what it's supposed to do either.

Does anyone know why this is happening and/or what the impact of not saving the system time at shutdown is?

any help is appreciated!

thanks, john
 
Old 10-30-2003, 11:54 PM   #12
robone
LQ Newbie
 
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Antother problem is having the clock display military or 24 hour time versus 12 hour time. That is easily changed in KDE by having the clock display with the %I (capital letter i) rather than %H format. To get there you right click on the clock and select the time and date format selection. Unfortunately, once changed it only changes in the kicker's clock when you logout and re- login.
Another pain. But less so. [/B][/QUOTE]

Sorry to seem so dense, but when i tried out what you said, using %I instead of %H, after reloggin, it didnt work. Maybe im not typing it in the right way or right place? I hate to drag out such a seemingly small thing.
the only format im seeing is the :
HH:MM:SS - nothing with percent sign.
thanx again
 
Old 10-31-2003, 05:37 AM   #13
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
try using the "date" command to set the time


man date, but it should be something like:

date MMDDhhmmssyyyy or something like that

i use ntp (network time protocol) to sync my time with time server but i just noticed this:

robert@decatur robert $ date -u
Fri Oct 31 10:36:16 UTC 2003
robert@decatur robert $ date
Fri Oct 31 05:36:20 EST 2003
robert@decatur robert $

UTC time is 5 hours off from EST time on my sytem....lol. But the one that matters for me is EST. I dont use the UTC clock.

actually when i think about it, it makes sense because IM -5 hours from GMT. coincidence?? isnt UTC the hardware clock? maybe ntp syncs my hardware clock with GMT and then my computer does the translation. that makes sense.

at any rate, try the date command.

Last edited by Robert0380; 10-31-2003 at 05:39 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 08:19 PM
Clock Problem Nick69 Debian 10 11-09-2006 01:24 PM
Clock problem wlaw Linux - Software 5 09-19-2004 12:03 PM
Clock problem. akihandyman Mandriva 6 08-12-2004 11:13 AM
Clock problem ragingchihuahua Linux - Newbie 3 04-04-2004 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:45 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration