Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #245220

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

From Greg Wooledge <greg@wooledge.org>
Newsgroups linux.debian.user
Subject Re: /etc/adjtime (setting the hardware clock to local time on Debian 11)
Date 2022-02-11 13:50 +0100
Message-ID <DPDx7-14VL-5@gated-at.bofh.it> (permalink)
References <DPCKJ-14pU-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

/etc/adjtime (setting the hardware clock to local time on Debian  11) José Luis González <bugs.jlg@gmail.com> - 2022-02-11 13:00 +0100
  Re: /etc/adjtime (setting the hardware clock to local time on Debian  11) Greg Wooledge <greg@wooledge.org> - 2022-02-11 13:50 +0100
    Re: /etc/adjtime (setting the hardware clock to local time on Debian  11) Greg Wooledge <greg@wooledge.org> - 2022-02-11 17:40 +0100
  Re: /etc/adjtime (setting the hardware clock to local time on Debian 11) Anssi Saari <as@sci.fi> - 2022-02-11 14:40 +0100
    Re: /etc/adjtime (setting the hardware clock to local time on Debian 11) Cindy Sue Causey <butterflybytes@gmail.com> - 2022-02-11 20:20 +0100

csiph-web