The officially official Devuan Forum!

You are not logged in.

#1 2026-07-02 14:32:17

safari
Member
Registered: 2026-06-02
Posts: 13  

How to set system time?

My system time is out. How do I fix that? hwclock, timedatectl, and ntp aren't available.

Last edited by safari (2026-07-02 14:33:03)

Offline

#2 2026-07-02 14:42:10

kapqa
Member
Registered: 2019-01-02
Posts: 702  

Re: How to set system time?

sudo apt install ntpsec-ntpdate

is valid for devuan 6.0

sudo ntpdate-debian
2026-07-02 16:39:31.356971 (+0200) +0.170255 +/- 0.010254 0.debian.pool.ntp.org 37.247.53.178 s2 no-leap

but with dual-boot windows + linux there is still woes, at least on computers that i use.

Offline

#3 2026-07-02 14:54:14

safari
Member
Registered: 2026-06-02
Posts: 13  

Re: How to set system time?

Thanks, that worked. Do you know if that sets OS time only, or hardware time too?

Last edited by safari (2026-07-02 15:03:15)

Offline

#4 2026-07-02 15:15:12

kapqa
Member
Registered: 2019-01-02
Posts: 702  

Re: How to set system time?

would have to guess, but apparently i am able to mess up the time every other time i boot into windows and back , or so ~

there have been kind peopel on this forum who told me how to fix  time with windows tricks ]

but those have tricks not lasted that long also use several computer , and what function on one, seem not always stable on another. . it has probably to do aswell with the computers itself; and maybe also language, regional settings may interfere?

maybe some day we can get to to the bottom of it.

Offline

#5 2026-07-02 18:00:19

kapqa
Member
Registered: 2019-01-02
Posts: 702  

Re: How to set system time?

i think the confusion stems also from the fact that during installation i set "language: englsish"

but i live somehwere else, and i am however constrained to select a region that has "english mapping" and hence everything goes tupsy turvy;

this is probably a limitating on the lclassic debian-inux installer.

Offline

#6 2026-07-02 19:27:02

rolfie
Member
Registered: 2017-11-25
Posts: 1,464  

Re: How to set system time?

safari wrote:

Do you know if that sets OS time only, or hardware time too?

ntp sets the HW clock. The rest is job of the operating system.

In Linux its standard to set the HW re. the bios clock to UTC. During installation you configure your location and timezone, and the OS then generates the local time from that.

Windows per default is running on local time, i.e. the bios clock is set to local time. This creates 2h time shifts on a Linux/Windows dual boot system. The best fix is to set Windows to UTC.

Online

#7 2026-07-03 04:20:01

FM81
Member
Registered: 2017-09-16
Posts: 40  

Re: How to set system time?

ntp sets the HW clock.

As fas as I know it doesn't. (And I'm not sure, if this was changed with ntpsec?)
NTP sets the systemtime only ...

If NTP would be depending on the HW-clock, how should it work with devices (e.g. singleborad-computers) without any such?

Best Regards, FM81

Last edited by FM81 (2026-07-03 04:20:39)


The most brilliant role in comedy is that of a fool, he must not be in order to make it seem. (Miguel de Cervantes)

Offline

#8 2026-07-03 05:49:45

RedGreen925
Member
Registered: 2024-12-07
Posts: 301  

Re: How to set system time?

would have to guess, but apparently i am able to mess up the time every other time i boot into windows and back , or so ~

there have been kind peopel on this forum who told me how to fix  time with windows tricks ]

but those have tricks not lasted that long also use several computer , and what function on one, seem not always stable on another. . it has probably to do aswell with the computers itself; and maybe also language, regional settings may interfere?

maybe some day we can get to to the bottom of it.

It has to do with windows always setting the system clock to local time. Most Linux installs default to Universal Time, the UTC method o doing it. A .reg file download to make the required change.

https://www.howtogeek.com/wp-content/up … C-Time.zip

From this page.

https://www.howtogeek.com/323390/how-to … l-booting/

Online

#9 2026-07-03 11:21:47

rolfie
Member
Registered: 2017-11-25
Posts: 1,464  

Re: How to set system time?

FM81 wrote:

As fas as I know it doesn't. (And I'm not sure, if this was changed with ntpsec?)

I does indirectly. When I shut down my PC the HW clock is updated. ntp and ntpsec are the same.

FM81 wrote:

If NTP would be depending on the HW-clock, how should it work with devices (e.g. singleborad-computers) without any such?

I am pretty sure any device supporting a clock has a RTC on board.

Online

#10 2026-07-03 12:12:33

FM81
Member
Registered: 2017-09-16
Posts: 40  

Re: How to set system time?

I does indirectly. When I shut down my PC the HW clock is updated.

In SYSVINIT this is done by /etc/init.d/hwclock.sh for example. But it works independent of what your systemtime was set.
It does it's job too, if there is no NTP or if you've changed your systemtime manually.

I am pretty sure any device supporting a clock has a RTC on board.

For example, Raspberry, at least up to models 4 (didn't know about 5) doesn't have a RTC. ("fake-hwclock" here is not the same)

But independent from all said before, you can go the way "vice versa" and set some type of hardware-vlock (for example DCF77, GPS or what ever) as source for NTP.

Greetings, FM81

Last edited by FM81 (2026-07-03 12:15:42)


The most brilliant role in comedy is that of a fool, he must not be in order to make it seem. (Miguel de Cervantes)

Offline

#11 Yesterday 21:37:36

ovi
Member
Registered: 2026-03-29
Posts: 11  

Re: How to set system time?

To maintain accuracy of your system's clock you can use "chrony". It will enable also a dedicated service.

If you run only Devuan is enough to install the "chrony" package.

If you are dual-boot with Windows it's recommended to have both system set to UTC time. Windows does not use UTC by default, and if you are dual-booting, this will conflict with Devuan.  That's why the installer will see that you have Windows installed and will set the time as Windows to local time.
To  make the system time to UTC in Windows just download and run the registry file that RedGreen925 suggested.
In Devuan do this:

Check if the system time is set to UTC or not:
$ cat /etc/adjtime

Marks the hardware clock standard as UTC in Devuan and verify
$ sudo hwclock --systohc --utc
$ cat /etc/adjtime

Force chrony to  re-sync:
sudo chronyc makestep

Last edited by ovi (Yesterday 21:39:51)

Offline

#12 Today 01:15:35

abower
Member
Registered: 2024-04-19
Posts: 46  

Re: How to set system time?

The kernel will set the hwclock itself if a time-keeper is running successfully.

All you needed to do was install ntpsec.

ntpsec-ntpdate is for single-shot use: that was wrong advice.

Yes, chrony will also work, but you don't need to switch software family to get this behaviour.

Offline

#13 Today 17:40:17

wert
Member
Registered: 2025-10-30
Posts: 16  

Re: How to set system time?

my laptop's battery and BIOS battery both died.
I have to set date/time after every boot manually. i done it via 'date -s ...'
i do it manually because i dont want internet connected services set it automatically. eh my taste.

when date/time is wrong most sites refuses my connection attemps.

Offline

Board footer