LinuxQuestions.org
Review your favorite Linux distribution.
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 09-16-2002, 09:26 PM   #1
frkstein
Member
 
Registered: Jan 2002
Location: Livonia, MI
Distribution: Ubuntu 10.04
Posts: 126

Rep: Reputation: 15
Linux vs. Winblows: Prize the Clock


An internal struggle is going on with my machine. I dual boot and everytime I switch between OS's the system clock gets thrown off. Each time I go from Linux to Windows to Linux, the clock loses 4 hours. How can I stop this?
 
Old 09-16-2002, 09:31 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
set the localtime in linux and windows the same
 
Old 09-16-2002, 09:53 PM   #3
frkstein
Member
 
Registered: Jan 2002
Location: Livonia, MI
Distribution: Ubuntu 10.04
Posts: 126

Original Poster
Rep: Reputation: 15
Nope...

I tried adjusting my Linux clock to the correct time. I rebooted, went into the Bios clock to confirm that it had the right time, which it did. I then let it boot into windows. It also had the correct time. I rebooted, checked the Bios clock again, also correct. Let it boot into Linux, -4 hours. I have my system setup for EDT, which should be correct. What is causing the conflict?
 
Old 09-16-2002, 11:30 PM   #4
KnightAbel
Member
 
Registered: Sep 2002
Location: Kaysville, UT USA
Distribution: Red Hat Linux, Slackware
Posts: 242

Rep: Reputation: 30
I'd like to know as well

it offset me negative two hours once. only once though, rebooting took care of it.
 
Old 09-17-2002, 02:38 AM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58

it's likely that the hardwareclock is set to something other than localtime

---SLACKWARE---

run timeconfig

it will set the link in /etc/localtime

and set the proper setting in /etc/hardwareclock

Last edited by DavidPhillips; 09-17-2002 at 02:58 AM.
 
Old 09-17-2002, 02:41 AM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
---SLACKWARE---

if you don't have timeconfig

echo localtime > /etc/hardwareclock

date 09170241

Last edited by DavidPhillips; 09-17-2002 at 02:57 AM.
 
Old 09-17-2002, 02:46 AM   #7
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
the above is for slack



redhat is different

see the file /etc/sysconfig/clock

set the ZONE="your/zone", UTC=false, and ARC=false


also run hwclock

[root@Firedragon root]# hwclock
Tue 17 Sep 2002 02:44:33 AM CDT 0.043256 seconds

Last edited by DavidPhillips; 09-17-2002 at 02:52 AM.
 
Old 09-17-2002, 02:58 AM   #8
Ztyx
Member
 
Registered: Dec 2001
Location: Stockholm, Sweden
Distribution: Ubuntu, Kubuntu and Debian
Posts: 338

Rep: Reputation: 30
You haven't set up your clock to automatically sync with a time-server somewhere?
 
Old 09-17-2002, 03:00 AM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Also Mandrake is the same as redhat


However instead of a link in /etc/localtime

Redhat and Mandrake copy the zone file to /etc/localtime

you can replace it with a link if you want so it can be confirmed where it points.

Last edited by DavidPhillips; 09-17-2002 at 03:03 AM.
 
Old 09-17-2002, 03:06 AM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
One other thing

[root@Firedragon root]# ls /usr/share/zoneinfo/US
Alaska Arizona Eastern Hawaii Michigan Pacific
Aleutian Central East-Indiana Indiana-Starke Mountain Samoa


you would set /etc/sysconfig/clock to look like this

UTC=false
ARC=false
ZONE="US/Eastern"

Last edited by DavidPhillips; 09-17-2002 at 03:07 AM.
 
Old 09-17-2002, 03:14 AM   #11
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
you can cp /usr/share/zoneinfo/US/Eastern /etc/localtime

or rm /etc/localtime; ln -s /usr/share/zoneinfo/US/Eastern /etc/localtime
 
Old 09-17-2002, 03:20 AM   #12
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
In Redhat you can also use

setup
 
Old 09-18-2002, 11:53 AM   #13
frkstein
Member
 
Registered: Jan 2002
Location: Livonia, MI
Distribution: Ubuntu 10.04
Posts: 126

Original Poster
Rep: Reputation: 15
No luck

Well, I tried everything suggested. I made sure that the hardware clock is set to the correct time. The BIOS clock is showing the correct time, windows clock shows the right time. But when I bring up Linux, the time is always -4 hours. Any other suggestions on how to fix this?
 
Old 09-18-2002, 12:56 PM   #14
Ztyx
Member
 
Registered: Dec 2001
Location: Stockholm, Sweden
Distribution: Ubuntu, Kubuntu and Debian
Posts: 338

Rep: Reputation: 30
You could make a script which sets the clock +4 hours everytime you start linux, and the opposite when it shuts down...
It's a bad fix, I know, although it's better than nothing.
 
Old 09-20-2002, 07:19 PM   #15
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
what is your timezone,
what do you get from the date command,
what do you get from the hwclock command


Last edited by DavidPhillips; 09-20-2002 at 07:20 PM.
 
  


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
Bob Geldof nominated for Nobel Prize J.W. General 0 07-06-2005 07:39 PM
Linux riskier than WinBlows? Ishkabibble Linux - Security 1 03-23-2005 05:23 PM
Non-Linux... Winblows programming... The_Nerd Programming 3 03-04-2004 02:40 AM
Bootdisk for Winblows in Linux shaggz Linux - General 1 12-25-2003 12:37 AM
Installing Winblows (I know - GASP) without destroying linux partition. cmack Linux - General 13 11-17-2003 05:09 PM

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

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