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


Groups > linux.debian.user > #245239

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

From Cindy Sue Causey <butterflybytes@gmail.com>
Newsgroups linux.debian.user
Subject Re: /etc/adjtime (setting the hardware clock to local time on Debian 11)
Date 2022-02-11 20:20 +0100
Message-ID <DPJCx-18Ke-1@gated-at.bofh.it> (permalink)
References <DPCKJ-14pU-1@gated-at.bofh.it> <DPEjw-15rE-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2/11/22, Anssi Saari <as@sci.fi> wrote:
> José Luis González <bugs.jlg@gmail.com> writes:
>
>> According to
>>
>> https://wiki.debian.org/DateTime
>>
>> There should be an /etc/adjtime file to configure the timezone for the
>> hardware clock. I have no such file in my Debian 11 laptop. May I know
>> if the file was removed and what was it replaced with?
>
> >From what I can tell, it's created by hwclock. If you run hwclock --set
> it should be created. Possibly you can also run
>
> timedatectl set-local-rtc 0
>
> but I don't know if that works if the file doesn't exist.
>
>> I just want to set the hardware clock to local time since this machine
>> is shared with Windows and the clock is actually local time.
>
> You might consider telling Windows to use UTC as well. For example here:
> https://feldspaten.org/2019/11/03/windows-10-clock-in-utc/


I debootstrap** Debian for those times I need a new installation.
These were the instructions I'd been using up until last time (maybe a
year ago):

https://www.debian.org/releases/stretch/amd64/apds03.html.en#idm4468

Basically that says;

=== BEGIN SNIPPET

# editor /etc/adjtime

Populate that with:

0.0 0 0.0

0
UTC

To configure timezone;

# dpkg-reconfigure tzdata

=== END SNIPPET

During debootstrap, the /etc/adjtime file doesn't exist until that
step is run, but it's also a brand new install that hasn't been booted
a first time yet.

That manually created file then works flawlessly for me here, but my
needs are simple. I think the hardware clock is set to UTC, by the
way.

Cindy :)

** N.B. Debootstrap was priceless as a method of installing Linux on
dialup Internet connections.. in case that still helps anyone else.
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA
* runs with birdseed *

Back to linux.debian.user | Previous | Next — Previous 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