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
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.
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.
Artix:[comexs]:/etc/localetime$ ls
Los_Angeles
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.
The Artix Wiki (https://wiki.artixlinux.org/Main/Installation#Set_system_clock) is very helpful in this regard. Don't forget to also check Arch Wiki (https://wiki.archlinux.org/title/System_time#UTC_in_Windows). It has several tips on clock issues when dualbooting with Windows. Keep in mind hwclock needs to be run with root privileges.
I have already done that but didn't help me.
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.
How do I know if the hardware clock is set to UTC?
sudo hwclock --verbose
Does
Time read from Hardware Clock: ----------------
Show your local time or utc time ?
https://www.timeanddate.com/worldclock/timezone/utc
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)
The way my time is kept correct is
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.
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.
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.
I switch my motherboard to UTC as gripped recommended. also I have to use the next command every time I boot back from windows
ntpdate -b -s -u 0.us.pool.ntp.org
https://wiki.archlinux.org/title/System_time#UTC_in_Microsoft_Windows