Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Hardware clock keeps acting weird
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
hwix
n00b
n00b


Joined: 08 Jul 2024
Posts: 24

PostPosted: Fri Nov 22, 2024 1:13 am    Post subject: [SOLVED] Hardware clock keeps acting weird Reply with quote

I installed Gentoo on my laptop and while setting it up I noticed that the system
time and hardware time were different. I decided to use chronyd to sync my
system but it gives me the wrong time. I set my hardware clock time in my
laptops BIOS but it still doesn't show up properly when using chronyd
in my system.

When using Windows on the same machine the time works just fine and isn't
giving me the wrong values so I know my BIOS isn't the issue.

In the file
Code:
/etc/conf.d/hwclock
I set
Code:
clock=local

and it still keeps giving me the error. I tried to change it to UTC but to no
avail.

Any solutions on how to make sure my Gentoo system is using the correct
hardware clock time I set in my laptop's BIOS?


Last edited by hwix on Fri Nov 22, 2024 1:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 273
Location: Pennsylvania, USA

PostPosted: Fri Nov 22, 2024 3:11 am    Post subject: Re: Hardware clock keeps acting weird Reply with quote

hwix wrote:
I installed Gentoo on my laptop and while setting it up I noticed that the system
time and hardware time were different. I decided to use chronyd to sync my
system but it gives me the wrong time.
Can you be more specific ? What's wrong with the time ?

Quote:
In the file
Code:
/etc/conf.d/hwclock
I set
Code:
clock=local

and it still keeps giving me the error. I tried to change it to UTC but to no
avail.
"local" is probably correct, because you dual-boot Windows, but: did you restart the hwclock service ?

Can you post the output of this, run as root ?
Code:
# date; hwclock --show; file /etc/localtime
I get:
Code:
Thu Nov 21 22:04:07 EST 2024
2024-11-21 22:04:07.003050-05:00
/etc/localtime: symbolic link to ../usr/share/zoneinfo/America/New_York
so my hardware and system clocks match.
(You only need root for the hwclock command.)
Back to top
View user's profile Send private message
hwix
n00b
n00b


Joined: 08 Jul 2024
Posts: 24

PostPosted: Fri Nov 22, 2024 1:32 pm    Post subject: Re: Hardware clock keeps acting weird Reply with quote

sublogic wrote:
hwix wrote:
I installed Gentoo on my laptop and while setting it up I noticed that the system
time and hardware time were different. I decided to use chronyd to sync my
system but it gives me the wrong time.
Can you be more specific ? What's wrong with the time ?

Quote:
In the file
Code:
/etc/conf.d/hwclock
I set
Code:
clock=local

and it still keeps giving me the error. I tried to change it to UTC but to no
avail.
"local" is probably correct, because you dual-boot Windows, but: did you restart the hwclock service ?

Can you post the output of this, run as root ?
Code:
# date; hwclock --show; file /etc/localtime
I get:
Code:
Thu Nov 21 22:04:07 EST 2024
2024-11-21 22:04:07.003050-05:00
/etc/localtime: symbolic link to ../usr/share/zoneinfo/America/New_York
so my hardware and system clocks match.
(You only need root for the hwclock command.)


I see where my problem was, I didn't symlink my
Code:
/etc/localtime
to
Code:
/usr/share/zoneinfo/
properly.
I did that now and after running chronyd my system time works just fine.

Thank you for your help!
:D
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2181

PostPosted: Fri Nov 22, 2024 4:37 pm    Post subject: Reply with quote

hwix,

You probably will want to leave things alone now the clock is working, but in general it's better to set the system clock to UTC and adjust Windows and Linux to handle that. They will convert to local time for display, assuming your version of Windows isn't too old to support it. That way you avoid weird things happening when daylight savings time starts and finishes.
Details of the Windows settings are in the troubleshooting section of the wiki.
_________________
Greybeard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum