Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: s3micol0n on 30 August 2018, 03:52:50

Title: [SOLVED] How to set the time?
Post by: s3micol0n on 30 August 2018, 03:52:50
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.
Title: Re: How to set the time?
Post by: konimex on 30 August 2018, 15:40:46
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.
Title: Re: How to set the time?
Post by: ####### on 30 August 2018, 16:03:46
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/ (https://aur.archlinux.org/packages/timeset-gui/)
Title: Re: How to set the time?
Post by: fungalnet on 30 August 2018, 17:05:22
I thought the proper command to set time was:

Code: [Select]
# date -s 21:21:59
Title: Re: How to set the time?
Post by: mrbrklyn on 30 August 2018, 22:27:22
I thought the proper command to set time was:

Code: [Select]
# date -s 21:21:59
that will not set the hardware clock or the time zone
Title: Re: How to set the time?
Post by: mrbrklyn on 30 August 2018, 22:32:11
Quote
[flatbush ~]# pacman -Ss tzdata
system/tzdata 2018e-2 [installed]
    Sources for time zone and daylight saving time data
Title: Re: How to set the time?
Post by: ucanzeee on 11 September 2020, 16:25:32
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??
Title: Re: How to set the time?
Post by: coyotl on 03 October 2020, 21:18:10
I installed OpenNTPD but saw no sign of it setting the time..  have a battery problem. Ntp however does that.
Title: Re: How to set the time?
Post by: SGOrava on 03 October 2020, 21:27:04
I installed OpenNTPD but saw no sign of it setting the time..  have a battery problem. Ntp however does that.
DId you enable the service ?
Title: Re: How to set the time?
Post by: Artist on 03 October 2020, 21:31:31
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
Title: Re: How to set the time?
Post by: linuxer on 03 October 2020, 23:18:00
Depending on the init system you use, install one of the following services and make it active:

Title: Re: How to set the time?
Post by: coyotl on 13 October 2020, 12:32:25
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?