Bug 104868

Summary: RTC guessing wrong for installation
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Ulrich Windl <Ulrich.Windl>
Component: InstallationAssignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: bugz57
Version: Beta 1   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Archive with YaST's logs
Logs taken from the installation system

Description Ulrich Windl 2005-08-16 07:06:41 UTC
On a system with a Linux partition and an NTFS partition (Windows/XP),
installation suggests the RTC (Real-Time Clock) runs UTC instead of local time.
As previous versions did detect that correctly, it must be a bug.
Comment 1 Jiří Suchomel 2005-08-16 08:05:33 UTC
Please attach the log files.
Comment 2 Jiří Suchomel 2005-08-16 08:06:21 UTC
Presence of windows partition is checked with this call:

if (size (Storage::GetWinPrimPartitions(Storage::GetTargetMap()))>0)
...

Thomas?
Comment 3 Thomas Fehr 2005-08-16 09:11:14 UTC
Not possible to say anything useful without log files.
Comment 4 Thomas Fehr 2005-08-16 09:37:36 UTC
BTW: I had a look into a log file of my installation (where I created a
windows primary partition to verify) and I could not see any call to
Storage::GetWinPrimPartitions at all. 
Are you sure this is called. If yes, when should it get called. I assume
necessarily before the timezone proposal but I did not see a log entry for 
such a call.
Comment 5 Jiří Suchomel 2005-08-16 10:25:06 UTC
It's in "MakeProposal" call of timezone_proposal.ycp
Comment 6 Thomas Fehr 2005-08-16 10:30:29 UTC
Can you see a line with GetWinPrimPartitions in your logfile?
I cannot find one here even after timezone proposal is finished.
Comment 7 Jiří Suchomel 2005-08-16 10:36:00 UTC
In my logs from beta1 installation, I can see it:

2005-08-08 15:47:35 <1> linux(2992) [Interpreter] clients/inst_proposal.ycp:67
Calling YaST client timezone_proposal (arguments: ["MakeProposal",
$["force_reset":false, "language_changed":false]])
2005-08-08 15:47:35 <1> linux(2992) [YCP] clients/timezone_proposal.ycp:28 date
call: $["exit":0, "stderr":"", "stdout":"2005\n"]

And now some calls from Storage begin:

2005-08-08 15:47:35,410 INFO  libstorage - Storage.cc(getFreeInfo):3531
device:/dev/hda1


But we're looking for the Ulrich's logs.
Comment 8 Ulrich Windl 2005-08-17 10:17:59 UTC
Created attachment 46261 [details]
Archive with YaST's logs
Comment 9 Thomas Fehr 2005-08-17 10:31:13 UTC
The log contains entries like:

Storage.ycp:3163 GetWinPrimPartitions num_linux 0 num_win 1 num_dos 0 num_os2 0
Storage.ycp:3217 GetWinPrimPartitions ret [$["device":"/dev/hda1",
"string":"windows"]]
clients/timezone_proposal.ycp:46 windows partition found: assuming local time

So the detection of the windows partition in yast2-storage seems to work fine.
Comment 10 Jiří Suchomel 2005-08-17 10:52:12 UTC
And this log says what is shown in proposal screen:

"Europa / Deutschland - Hardware Clock Set To Local Time 15:00:10 - 14-08-2005"

Ulrich, you either provided wrong logfiles or the behaviour is correct.
Comment 11 Ulrich Windl 2005-08-17 12:50:42 UTC
AFAIR I manually changed the timezone for the RTC. Can you see that from the
logs?  I've been updating installing so many times recently that I could have
mixed things, but I don't think so.
Comment 12 Jiří Suchomel 2005-08-17 13:11:37 UTC
So what are you reporting?

You said "installation suggests the RTC runs UTC instead of local time"; this is
not true, according to the logs.
Comment 13 Ulrich Windl 2005-08-22 06:35:35 UTC
Created attachment 46803 [details]
Logs taken from the installation system

Even on a second installationm attempt (which had been aborted), the suggestion
was to use UTC for the RTC.
Comment 14 Jiří Suchomel 2005-08-22 06:40:42 UTC
now I see it: inst_timezone is started before timezone_proposal.ycp
Comment 15 Jiří Suchomel 2005-08-22 08:14:37 UTC
Thomas, is it possible to call GetWinPrimPartitions before the proposal? Do I
get expected result?

(In current installation workflow, timezone setting is before creating the
proposal.)
Comment 16 Thomas Fehr 2005-08-22 08:18:37 UTC
Yes, it should not matter when you call GetWinPrimPartitions(), to be on the
save side you can just check the debug output. It is also printed if no
Windows partitions are detected.
Comment 17 Jiří Suchomel 2005-08-22 09:04:24 UTC
OK, fixed.

Ulrich, please test it as soon as you'll get beta3.
Comment 18 Ulrich Windl 2005-08-29 06:33:25 UTC
The proposal is correct in beta3, however the time displayed is wrong (timezone
correction applied to localtime). However after installation the clock seems
correct. Now if the user would "correct" the time during installation (because
of the wrong display), the time would be wrong at the end.
I know that this bug as a very long tradition is SuSE Linux, but that's no
reason not to fix it some day.
Comment 19 Jiří Suchomel 2005-08-29 06:39:44 UTC
What is displayd wrongly when proposal is correct?
Does it mean that only proposal for using local time is correct?
Comment 20 Jiří Suchomel 2005-08-29 06:47:37 UTC
I think it should be meanwhile fixed with the fix of bug #112900
Comment 21 Ulrich Windl 2005-08-29 07:09:30 UTC
(In reply to comment #19)
> What is displayd wrongly when proposal is correct?

It is correctly proposed that the RTC runs in local time, but the time displayed
is the local time plus the timezone offset (2 hours for MESZ). So the time
displayed is two hours ahead. (It would be correct if RTC were running UTC).