Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Wrong Time [SOLVED] (Read 2677 times) previous topic - next topic
0 Members and 6 Guests are viewing this topic.

Wrong Time [SOLVED]

The time on my pc is wrong. Like for example right now its 2022/06/13 00:39:16 but it says its 2022-06-12 17:39:15

Code: [Select]
Artix:[comexs]:~$ hwclock --verbose
hwclock from util-linux 2.38
System Time: 1655080864.938165
Trying to open: /dev/rtc0
hwclock: cannot open /dev/rtc0: Permission denied
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
I not sure is this is normal.

Code: [Select]
Artix:[comexs]:~$ sudo hwclock --verbose
hwclock from util-linux 2.38
System Time: 1655080755.960178
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1655078067 seconds after 1969
Last calibration done at 1655078067 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
...got clock tick
Time read from Hardware Clock: 2022/06/13 00:39:16
Hw clock time : 2022/06/13 00:39:16 = 1655080756 seconds since 1969
Time since last adjustment is 2689 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2022-06-12 17:39:15.937005-07:00
so the time were it says "Time read from Hardware Clock" is the right but the time at the bottom is wrong.

Code: [Select]
Artix:[comexs]:/etc/localetime$ ls
Los_Angeles

Code: [Select]
Artix:[comexs]:/etc/localetime$ date
Sun Jun 12 05:49:47 PM PDT 2022


I dual booting Artix (OpenRC) and Windows but they are both on separate drives.

Re: Wrong Time

Reply #1
The Artix Wiki is very helpful in this regard. Don't forget to also check Arch Wiki. It has several tips on clock issues when dualbooting with Windows. Keep in mind hwclock needs to be run with root privileges.


Re: Wrong Time

Reply #3
I'm not sure but is the 'correct' time you say the hwclock is, the correct UTC time, or the correct Los_Angeles time.
Because if it's the correct Los_Angeles time ( it's expected to be UTC) then it will be shifted seven hours back by the Los_Angeles timezone setting. Which appears to be what is happeining ?

Make sure the hardware clock is set to UTC time.

Re: Wrong Time

Reply #4
I'm not sure but is the 'correct' time you say the hwclock is the correct UTC time or the correct Los_Angeles time.
Because if the correct Los_Angeles time ( it's expected to be UTC) then it will be shifted seven hours back by the Los_Angeles timezone setting. Which appears to be what is happeining ?

Make sure the hardware clock is set to UTC time.
How do I know if the hardware clock is set to UTC?


Re: Wrong Time

Reply #6
Code: [Select]
Time read from Hardware Clock: 2022/06/13 02:14:39
This the time where is I live next to Los Angels.

On the web site you linked isn't the right time. (7 hours ahead from where I live)

Re: Wrong Time

Reply #7
The way my time is kept correct is
Code: [Select]
ntpdate  -b -s -u 0.uk.pool.ntp.org &
in /etc/rc.local
you can get ntpdate from package ntp.

If you run from the terminal add sudo.

Re: Wrong Time

Reply #8
Code: [Select]
Time read from Hardware Clock: 2022/06/13 02:14:39
This the time where is I live next to Los Angels.

On the web site you linked isn't the right time. (7 hours ahead from where I live)
If you really want the Hardware Clock to be set to your local time (As stated it's supposed to be set to UTC, 7 hours ahead of you), then DON'T set a timezone of Los Angeles. Set it to UTC. But that's a convoluted way of doing things and may cause other issues.

Linux expects your Hardware Clock to be set to UTC time.

Re: Wrong Time

Reply #9
The time on my pc is wrong. Like for example right now its 2022/06/13 00:39:16 but it says its 2022-06-12 17:39:15

Code: [Select]
Artix:[comexs]:~$ hwclock --verbose
hwclock from util-linux 2.38
System Time: 1655080864.938165
Trying to open: /dev/rtc0
hwclock: cannot open /dev/rtc0: Permission denied
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
I not sure is this is normal.



Are you running it without root access?    In your first example, that is what it looks like.

Re: Wrong Time

Reply #10

Are you running it without root access?    In your first example, that is what it looks like.
My problem has already been solved I forgot to update this post since I did I bunch of random things and It something worked.

Re: Wrong Time [SOLVED]

Reply #11
I switch my motherboard to UTC as gripped recommended. also I have to use the next command every time I boot back from windows
Code: [Select]
ntpdate -b -s -u 0.us.pool.ntp.org