LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-05-2004, 09:38 PM   #1
Jakerohs
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Rep: Reputation: 0
Question How to correctly set date/time?


I hope this is the right forum...oh well here goes.

Problem: Linux displays a different time of day to Windows.

System setup: Mandrake 9.2/Gnome, Windows XP dual booted.

Example: If I boot into windows, the time is correctly displayed as 4pm. If I boot into Linux, the time is incorrectly displayed as 5am. If I adjust the time in Linux to the correct time, then Windows displays the wrong time when I switch back.

Is there any way to fix this? The time difference always seems to be 11 hours.
 
Old 01-05-2004, 10:43 PM   #2
linuxbotx
Member
 
Registered: Oct 2003
Location: USA
Distribution: Fedora Core 4
Posts: 247

Rep: Reputation: 30
What are you doing to set the time? Try this. Start KDE. Right click on the clock in the right lower corner. Click on Configure Clock, then click on Time Zone. Click on your correct time zone. This should fix it.
 
Old 01-05-2004, 10:43 PM   #3
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
you can use ntpd to poll internet time, there are numerous how-to and I believe you can find one at http://ww.tldp.org
 
Old 01-06-2004, 01:36 AM   #4
Jakerohs
LQ Newbie
 
Registered: Dec 2003
Posts: 6

Original Poster
Rep: Reputation: 0
The time zone is set correctly. The problem seems to be linux reading / writing the the time at bootup/shutdown incorrectly or in a different format. I know how to change the time, but it doesn't get set correctly at startup.
I'll have a go at using ntpd at startup to set the time instead of reading from the motherboard. Thanks.
 
Old 01-06-2004, 10:17 AM   #5
jc2it
LQ Newbie
 
Registered: Jan 2004
Posts: 29

Rep: Reputation: 15
Recently, I had quite an experience setting the time on a Slackware 4.0 box that does not have X installed. This required me to learn the CMI for changing the time.

You have two clocks in Linux a CMOS or Hardware Clock and a Clock that is provided by Linux. Your problem may stem from the two not being in sync. In Linux set the time either with the GUI or the Date command. Better yet use 'ntpdate' or 'netdate'. Search the web or your man pages on how to use them. Then use either the 'clock -w' or the 'hwclock' command (you will have one or the other) to set the CMOS clock from the Linux clock. This will sync the two clocks.

Also check 'ls -l /etc/localtime' to determine if the Timezone is set correctly in Linux.

jc2it
 
Old 01-08-2004, 03:48 AM   #6
beaucoup
Member
 
Registered: Jun 2003
Location: Florence, SC
Distribution: Gentoo i386
Posts: 180

Rep: Reputation: 30
It sounds to me as though Linux has been configured to assume that your hardware clock is in GMT, and then impose your selected timezone as an offset. Windows, on the other hand, is likely actually setting the hardware clock to the time in your current zone.

For dual boot systems, this latter configuration makes more sense. I believe that setting the clock with the "date" command and NOT using the --universal switch should achieve this, but I'm not able to try it out at the moment.

If you use ntpd, such an adjustment should be doable from within that package's configuration. I'm not terribly familiar with it, though.

-Andrew
 
  


Reply



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
how to set date and time thick_guy_9 Slackware 8 07-07-2005 08:46 AM
Erm, how do I set my system date/time? vasudevadas Slackware 4 09-14-2004 03:40 PM
date command do not keep time set shanenin Linux - Software 1 09-04-2004 08:16 PM
Set Date/Time Under AIX dvong3 AIX 2 04-10-2004 11:54 AM
set date and time maggielmk Programming 3 10-24-2001 01:21 AM

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

All times are GMT -5. The time now is 02:33 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