LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 08-24-2018, 12:06 PM   #1
Rick069
Member
 
Registered: Feb 2005
Distribution: Arch Linux
Posts: 204

Rep: Reputation: 30
REQ: Solution to out of whack clocks


I dual boot between windoze 10 and Arch Linux and every time that I do, both clocks are all out of whack. Is there a way to stop this from happening?
 
Old 08-24-2018, 01:04 PM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,697
Blog Entries: 19

Rep: Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499
Windows always used to require hardware clocks to be set to local time. I don't know if it still does; I haven't used Windows for years. But if you do need to do this, you must tell your Linux system that the clock is set in this way. The quickest way is to run the hwclock program with the -l or --localtime option. Once hwclock has been given this information, it should default to local time every time it runs.
 
Old 08-24-2018, 01:06 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,885
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Do you mean timezones? Or something similar?

I see that, and when I go into the time setting (GUI form), amazingly things clear up before I can change anything. This is a phenomena I see when swapping from one boot to the other. Like it understands my timezone and when I notice that my time is off, I go to fix it, and viola, it becomes all set as soon as I've started to try to fix it. Sort of like it knew, but didn't do a whoa-ohh! Until I myself noticed and started to intervene.

Last edited by rtmistler; 08-24-2018 at 01:07 PM.
 
Old 08-24-2018, 08:32 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,397
Blog Entries: 28

Rep: Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165Reputation: 6165
What hazel said accords with my experience.

Linux customarily sets the time zone to UTC (what used to be called "Greenwich Mean Time") and then adjusts the clock display to be consistent with the local time zone via the timezone setting.

Windows sets the clock to local time. In a dual boot situation, the two operating systems will reset the hardware clock to fit their individual preferences.

I once resolved this problem on a machine that was dual-boot Fedora and Windows, but it was so long ago I forget how.

I did learn my way around the date and hwclock commands. I would set the system time with the date command, then use hwclock -w to set the hardware clock to reflect the system clock.

One workaround would be to change the Linux clock to local time.

Last edited by frankbell; 08-24-2018 at 08:33 PM.
 
Old 08-24-2018, 10:15 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,797

Rep: Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952
In addition the hardware clock UTC/local time setting is kept in /etc/adjtime file. To summarize what was said above here is the Arch guide.

https://wiki.archlinux.org/index.php/Time
 
Old 08-25-2018, 02:30 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by frankbell View Post
One workaround would be to change the Linux clock to local time.
another would be to tell windows to use UTC.
i hear this is possible with some registry tweak (shudder).
 
Old 08-25-2018, 07:12 AM   #7
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,697
Blog Entries: 19

Rep: Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499Reputation: 4499
Quote:
Originally Posted by rtmistler View Post
This is a phenomena I see when swapping from one boot to the other. Like it understands my timezone and when I notice that my time is off, I go to fix it, and viola, it becomes all set as soon as I've started to try to fix it. Sort of like it knew, but didn't do a whoa-ohh! Until I myself noticed and started to intervene.
Quite a few distros nowadays have an ntp client that starts at boot. Debian does for a start.
When I started having all this trouble with my hardware clock, I noticed that Debian still always came up with the correct time showing on the LXDE panel. I investigated and found that it was using ntp. So I installed ntp on Crux and LFS, and now they all three set the clock correctly, though LFS takes a couple of minutes to so so for some unknown reason.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
REQ:A solution to a flash problem. Rick069 Linux - Software 3 05-16-2012 09:45 PM
REQ:A solution to random pauses of audio files. Rick069 Debian 3 05-26-2011 04:38 PM
REQ: Solution to random stopage of .mp3 file Rick069 Linux - Software 1 09-20-2010 01:21 PM
REQ: Solution to Google earth problem Rick069 Mandriva 1 08-30-2010 09:42 PM
Solution Req for real-time scenario anand_kt Linux - Networking 1 02-11-2005 01:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 07:35 AM.

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