Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] How to set the time? (Read 17568 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] How to set the time?

I just freshly installed artix.
I am used to setting time using timedatectl.
But as this is sytemd-free, we don't have timedatectl.

I am currently using runit.

Thank you for the help.

Re: How to set the time?

Reply #1
You can set the date using the date command from GNU coreutils.

Code: [Select]
# date MMDDhhmmYYYY

With MM as month, DD as day, hhmm as hour and minute, and YYYY for year.

However, I recommend you to use OpenNTPD instead to sync the time with a server for an accurate time.
now only the dinit guy in artix

Re: How to set the time?

Reply #2
Code: [Select]
ls -R /usr/share/zoneinfo
(Choose your timezone, there are lots of choices for some places, find a large size file which probably has more detail is my guess)
ln -sf /usr/share/zoneinfo/(somecountry) /etc/localtime
ls -l /etc/localtime
(check you have set it right)
Now go into the BIOS menu on your PC and set the time to Greenwich Mean Time / Universal Time which is London UK winter time, not summer time. Leave it like that, don't change it for daylight saving time or anything. It should all work automatically then, unless you are dual booting another OS, as that may set the system clock to local time. (The time won't be automatically corrected  though unless you set up ntpd as suggested above, but you can fix it in BIOS if it eventually drifts a bit.)
Most likely there are GUI apps that would help too, perhaps some other Artix users can recommend these.
The only one I've tried (and it worked) is Aaditya's timeset-gui, this was available as a package in Manjaro OpenRC and was included on the OpenRC XFCE iso, but in Artix it has to be installed from the AUR:
https://aur.archlinux.org/packages/timeset-gui/

Re: How to set the time?

Reply #3
I thought the proper command to set time was:

Code: [Select]
# date -s 21:21:59


Re: How to set the time?

Reply #5
Quote
[flatbush ~]# pacman -Ss tzdata
system/tzdata 2018e-2 [installed]
    Sources for time zone and daylight saving time data

Re: How to set the time?

Reply #6
You can set the date using the date command from GNU coreutils.

Code: [Select]
# date MMDDhhmmYYYY

With MM as month, DD as day, hhmm as hour and minute, and YYYY for year.

However, I recommend you to use OpenNTPD instead to sync the time with a server for an accurate time.
It conflicts with ntp. Should I remove ntp??

Re: How to set the time?

Reply #7
I installed OpenNTPD but saw no sign of it setting the time..  have a battery problem. Ntp however does that.


Re: How to set the time?

Reply #9
If the time offset is too high NTP will not change it.
In that case try ntpq -p   (it may take a while before this shows results)
Or ntpdate
On a bended knee, or systemd, you will never live free

Re: How to set the time?

Reply #10
Depending on the init system you use, install one of the following services and make it active:

  • ntp-openrc
  • ntp-runit
  • ntp-s6

Re: How to set the time?

Reply #11
No. Sorry I'm used to Debian/ubuntu where this takes care of itself. Ntp apparently got activated on installing the package. I think it has a support package for the 3 init systems? I have assumed that installing these packages also will activate the corresponding service? Btw is there an ncurses or gui service manager for OpenRC?