You are not logged in.
Pages: 1
Hello,
I have a Lenovo Thinkpad X1 Extreme Gen3. Before I installed arch, there was a Windows installed.
My Problem is, that the time was wrong.
So what did I do:
sudo ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
sudo timedatectl set-local-rtc 1 --adjust-system-clock
sudo hwclock --systohc
sudo ntpd -qSo nothing worked, so I changed manually the time yesterday:
timedatectl set-time "2021-05-17 05:39:30"Now I have the correct time, but OTP not working anymore on my notebook. So there must still be an issue with the time.
Last edited by Beli3ver (2021-05-16 15:49:49)
Offline
OTP = One time password? How does it relate to your description? What do you expect and what happens?
Offline
What is the output of timedatectl
??
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
OTP = One time password? How does it relate to your description?
OTP's use the system time for one of the hashing algorithm inputs. If the system clock is incorrect then it won't work.
Offline
This is the output from timedatectl
❯ timedatectl
Local time: Mo 2021-05-17 19:33:23 CEST
Universal time: Mo 2021-05-17 17:33:23 UTC
RTC time: Mo 2021-05-17 19:33:23
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: yes
Warning: The system is configured to read the RTC time in the local time zone.
This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments. The RTC
time is never updated, it relies on external facilities to maintain it.
If at all possible, use RTC in UTC by calling
'timedatectl set-local-rtc 0'.Offline
You need to enable the ntpd.service.
Offline
Here is a quick script to detect if you local clock is widely off from official time without using ntp. You should get less than 2 seconds difference with this crude method when your clock is set properly.
echo $(( $(curl http://icanhazepoch.com/)/1000 - $(date +%s) ))https://major.io/icanhazip-com-faq/
Before I installed arch, there was a Windows installed.
If windows is not installed anymore I urge you to convert back to keeping the hardware clock in UTC as described in the warning.
If you still dualboot windows, I still suggest you consider using the UTC hardware clock and configure windows to use that.
https://wiki.archlinux.org/title/System … ft_Windows
Last edited by progandy (2021-05-16 18:27:28)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Ok, I do both, timedatectl looks like this now:
❯ timedatectl
Local time: Mo 2021-05-17 20:28:52 CEST
Universal time: Mo 2021-05-17 18:28:52 UTC
RTC time: Mo 2021-05-17 18:28:52
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: no
NTP service: inactive
RTC in local TZ: noAnd your test script says this:
[malte@NB-RC-LOH-2 ~]$ echo $(( $(curl http://icanhazepoch.com/)/1000 - $(date +%s) ))
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14 100 14 0 0 121 0 --:--:-- --:--:-- --:--:-- 121
-86399Offline
Ah right. the date is wrong. Today is the 16th, not 17th.
For NTP the wiki has documentation for setting it up if you haven't found it yet.
https://wiki.archlinux.org/title/System … ronization
https://wiki.archlinux.org/title/Networ … col_daemon
Last edited by progandy (2021-05-16 19:02:21)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Pages: 1