Re: Removing "CMOS clock set to UTC" question

From: Ed Maste <emaste_at_freebsd.org>
Date: Thu, 13 Jun 2024 15:32:10 UTC
On Wed, 12 Jun 2024 at 18:51, Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
>
> tzsetup(8) manpage is a bit confusing.
> Does `tzsetup -s` create /etc/wall_cmos_clock when it's not exist and
> selected timezone is NOT UTC?

No, with -s tzsetup neither creates nor removes /etc/wall_cmos_clock.
I've created https://reviews.freebsd.org/D45576 to clarify this in
tzsetup(8) and would appreciate review.

> Unfortunately, most of computers used by end-users (personal or
> corporate) would running Windows. Does emulated CMOS clocks on VMware,
> virtualBox and/or something else on Windows shows always UTC, or wall
> CMOS clock same as host Windows?

For the last 10 years we've skipped this question when running in a VM:

commit e91afc1cda50cbcb8fffa3f52cc0f8c595a392a3
Author: Devin Teske <dteske@FreeBSD.org>
Date:   Tue Nov 11 19:37:17 2014 +0000

    Default `bsdconfig timezone' and `tzsetup' to `-s' in a VM.

    Recommended by: cperciva
    Reviewed by:    cperciva
    Relnotes:       tzsetup and bsdconfig now assume that the
"hardware" clock inside a VM is set to UTC

VirtualBox has an option to indicate that the RTC stores UTC time, I
assume others do as well. There's a VirtIO RTC interface that provides
(among others) a UTC clock.