Bug 2229207

Summary: initial-setup always sets the RTC to local mode
Product: [Fedora] Fedora Reporter: Davide Cavalca <davide>
Component: anacondaAssignee: anaconda-maint
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: anaconda-maint, asahi-sig, janne-fdr, vslavik, w
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
inital-set/anaconda log from an affected fedora asahi remix system none

Description Davide Cavalca 2023-08-04 15:54:04 UTC
In the Fedora Asahi Remix we've noticed that inital-setup (which uses anaconda under the hood) is always setting the RTC to local by writing LOCAL to /etc/adjtime. We would expect it to use UTC instead.

Reproducible: Always

Steps to Reproduce:
1. Get an Apple Silicon Mac (M1 mac mini or macbook is the easiest)
2. curl https://fedora-asahi-remix.org/install | sh
3. go through the install
4. check the time

Comment 1 Janne Grunau 2023-08-04 16:31:05 UTC
Created attachment 1981677 [details]
inital-set/anaconda log from an affected fedora asahi remix system

from browsing through the anaconda source code I suspect the problem is that time_initialize() https://github.com/rhinstaller/anaconda/blob/f076f51c9c56ef226dc7ee56fce3feefa5cf2032/pyanaconda/timezone.py#L55 is not called.

I do not see an execution of `hwclock --hwtosys ...` logged. From my cursory browsing think the program execution should be logged and `hwclock --systohw --local` is logged.

timezone_proxy.IsUtc defaults to false resulting in the system being configured LOCAL in etc/adjtime.