Arch Linux

Date and Time

Had to reset BIOS CMOS. Date time on the running system got wrong. Got all sorts of problems with invalid certificates with browsers accessing webpages.

Make sure to have openntpd package installed. Better to do it when setting up a new machine or on a fresh install so it is kept up to date with the rest of the system.

$ pacman --sync --refresh --needed openntpd

Then start the service:

$ sudo systemctl start openntpd.service

It will set the system clock with some server on the internet. Then, set the hardware clock based according to the system clock:

$ sudo hwclock --show
2023-04-10 04:30:02.733780-03:00
           ---------------------
                \
                 \
             Wrong time 😭

$ sudo hwclock --systohc

$ sudo hwclock --show
2023-10-04 07:30:21.390049-03:00
           ---------------------
                \
                 \
             Correct time 😎

Also see:

Pacman Mirrors

Reflector

$ sudo pacman --sync --refresh reflector

$ sudo reflector \
    --latest 3 \
    --sort rate \
    --country Brazil,United\ States \
    --save /etc/pacman.d/mirrorlist