Bug 1131964

Summary: if /etc/localtime symlink has relative path – YaST Date and Time module may fail to recognize time zone
Product: [openSUSE] openSUSE Distribution Reporter: Mindaugas Baranauskas <opensuse.lietuviu.kalba>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: schubi
Version: Leap 15.0   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: YaST Date and Time module when /etc/localtime symlink has relative path
yast2 logs

Description Mindaugas Baranauskas 2019-04-09 11:02:41 UTC
Created attachment 802435 [details]
YaST Date and Time module when /etc/localtime symlink has relative path

If /etc/sysconfig/clock file does not exist and
if /etc/localtime is symlink to
../usr/share/zoneinfo/Europe/Vilnius
(i.e. relative path)
then YaST Date and Time module fails to recognize time zone.

I can reproduce in openSUSE Leap 15.0 and Tumbleweed.

Workaround 1:
manually change /etc/localtime symlink to look into
/usr/share/zoneinfo/Europe/Vilnius
(i.e. absolute path)
then – YaST Date and Time module success to recognize time zone.

Workaround 2:
Settings from /etc/sysconfig/clock file may be used instead of /etc/localtime
Comment 1 Mindaugas Baranauskas 2019-04-09 11:14:56 UTC
Created attachment 802438 [details]
yast2 logs
Comment 2 Stefan Schubert 2019-04-09 15:30:34 UTC
(In reply to Mindaugas Baranauskas from comment #0)
> If /etc/sysconfig/clock file does not exist and
I have tested openSUSE-Tumbleweed-DVD-x86_64-Snapshot20190325-Media.iso
and this file is available.
I have also tested changing time zone and it has worked well.
I think that is really a corner case of a corrupted system and you have already found the reason and a solution for it. :-)
Comment 3 Mindaugas Baranauskas 2019-04-09 16:26:49 UTC
I found this bug in appliance created by KIWI in OpenSUSE Build Service. Others could also have this bug for their openSUSE based appliances.