[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/adjtime (setting the hardware clock to local time on Debian 11)



On Fri, Feb 11, 2022 at 12:54:01PM +0100, José Luis González wrote:
> According to
> 
> https://wiki.debian.org/DateTime
> 
> There should be an /etc/adjtime file to configure the timezone for the
> hardware clock.

That's... not how I'd describe that file, but I suppose "telling whether
the HW clock is on UTC or not" is indeed one of its features.

> I have no such file in my Debian 11 laptop. May I know
> if the file was removed and what was it replaced with?

unicorn:~$ ls -l /etc/adjtime 
-rw-r--r-- 1 root root 46 Jan 11  2018 /etc/adjtime
unicorn:~$ cat /etc/adjtime 
0.000000 1515718148 0.000000
1515718148
LOCAL
unicorn:~$ dpkg -S /etc/adjtime
dpkg-query: no path found matching pattern /etc/adjtime
unicorn:~$ grep adjtime /var/lib/dpkg/info/*.postinst
/var/lib/dpkg/info/systemd.postinst:    if [ "$UTC" = "no" ] && [ ! -e /etc/adjtime ]; then
/var/lib/dpkg/info/systemd.postinst:        printf "0.0 0 0.0\n0\nLOCAL\n" > /etc/adjtime

Are you running systemd, or some other init system?


Reply to: