Bug 617861

Summary: Timezone not set at early installation, thus NTP time is wrong
Product: [openSUSE] openSUSE 11.3 Reporter: Thomas Renninger <trenn>
Component: YaST2Assignee: Jiří Suchomel <jsuchome>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P3 - Medium    
Version: Milestone 7   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: maint:released:sle11-sp1:48495
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: y2logs of the affected machine.
patch for /usr/share/YaST2/include/timezone/dialogs.ycp
patch for /usr/share/YaST2/include/timezone/dialogs.ycp
patch for /usr/share/YaST2/include/timezone/dialogs.ycp

Description Thomas Renninger 2010-06-28 11:23:48 UTC
This is even before installation when you configure the time and timezone.
I modified the timezone from an American one to Europe->Germany.

I then wanted to set the NTP server by using the chaNge button.
The time was retrieved from the NTP, but because the timezone was not set yet, the time was wrong by several hours.

I could fix this at runtime by doing:
mv /etc/localtime  /etc/localtime-old
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
and setting "Berlin" in:
/etc/sysconfig/clock
TIMEZONE="Berlin"

Then going back to the Yast2 Window and refreshing the time through NTP gave me the right time.

This was in text mode, but it should be the same with an X driven Yast installation.
Comment 1 Jozef Uhliarik 2010-06-29 07:50:02 UTC
Please attach y2logs.If you're in doubt follow:http://en.opensuse.org/Bugs/YaST
Thanks.
Comment 2 Thomas Renninger 2010-06-29 10:22:52 UTC
Created attachment 372397 [details]
y2logs of the affected machine.

I did some more installing etc. afterwards, but it hopefully is easy to grep for the relevant part.
Comment 3 Jiří Suchomel 2010-06-30 08:54:29 UTC
(In reply to comment #0)
> This is even before installation when you configure the time and timezone.

You mean you've booted live media and changed it before starting installation from it? Or what was the situation?> I then wanted to set the NTP server by using the chaNge button.


> The time was retrieved from the NTP, but because the timezone was not set yet,
> the time was wrong by several hours.

The time zone should be saved before calling NTP, but not in case of live installation... currently I'm not sure why.
Comment 4 Jiří Suchomel 2010-06-30 08:55:39 UTC
Created attachment 372808 [details]
patch for /usr/share/YaST2/include/timezone/dialogs.ycp

Could you patch your  /usr/share/YaST2/include/timezone/dialogs.ycp and try to reproduce the problem?
Comment 5 Thomas Renninger 2010-07-02 13:23:28 UTC
No it does not help.
It's rather easy to reproduce and I found out some more.
The X-window with the fancy map is not affected.
If you run yast in non-graphical mode, choose:
System->"Date and Time"

If you switch between continents, you see the time gets adjusted.
If you switch between states (e.g. choose USA, and jump between states), the time(zone) does not get adjusted. It gets adjusted if you hit the enter button, but nobody is doing that on a non-graphical installation.
Instead you hit ALT-n (in my case/language for Change) and the wrong timezone is taken over.
The defect is that if you synchronize the time there with NTP you see the wrong time, because of the wrong taken over zone.
The zone is still adjusted correctly if you leave the dialog and afterwards the time is correct. It's confusing but not "that" sever.
Comment 6 Jiří Suchomel 2010-07-02 13:27:29 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > This is even before installation when you configure the time and timezone.
> 
> You mean you've booted live media and changed it before starting installation
> from it? Or what was the situation?

I'm not sure what is your case about...
Comment 7 Jiří Suchomel 2010-07-02 14:49:04 UTC
Created attachment 373554 [details]
patch for /usr/share/YaST2/include/timezone/dialogs.ycp

Try this patch instead.
Comment 8 Thomas Renninger 2010-07-05 08:25:38 UTC
That works, thanks!

Another minor issue I found while testing/playing with this:
When I am in the dialog to change the time, I have two options:
  - Manually
  - Synchronize with NTP Server

The default is "Manually".
When I change things to:
  [x]   Synchronize with NTP Server

       [x] Run NTP as daemon
       [x] Save NTP Configuration

The NTP daemon is not started and when I come back to this dialog, the setting is back to "Manually".

What helps is to enter the extended NTP "Configure" dialog and enable NTP daemon there, then the settings are really taken over and the NTP daemon gets activated.

The same the other way around:
If default setting is changed to "Synchronize with NTP Server" via the extended NTP configure dialog and I set it back to "Manually" time setting, the setting gets ignored again and NTP server/daemon is still used.

Eventually we could have another chat, it's hard to explain this via bugzilla.
If it's again not that hard to fix, it would be nice get it done.

Anyway, the patch in comment #7 fixes this bug.
Comment 9 Jiří Suchomel 2010-07-12 07:37:27 UTC
Created attachment 375187 [details]
patch for /usr/share/YaST2/include/timezone/dialogs.ycp

Try this patch...
Comment 10 Jiří Suchomel 2010-07-15 11:34:50 UTC
ping
Comment 11 Jiří Suchomel 2010-07-30 07:06:01 UTC
Thomas?
Comment 12 Thomas Renninger 2010-08-03 11:29:35 UTC
Sorry for the late reply.
Patch from comment #9 doesn't fix the problem from comment #8.
I should not have mentioned the stuff in comment #8 which is unrelated to the original problem.
The patch from comment #7 already fixes the reported issue for me.
If it gets applied, this bug can be closed.
I opened another bug for the problem described in comment #8 now:
https://bugzilla.novell.com/show_bug.cgi?id=627818
Comment 13 Jiří Suchomel 2010-08-03 13:28:15 UTC
So, this one is fixed
Comment 14 Swamp Workflow Management 2012-07-31 12:08:49 UTC
Update released for: yast2-country, yast2-country-data
Products:
SLE-SERVER 11-SP1-TERADATA (x86_64)
Comment 15 Swamp Workflow Management 2012-08-31 14:53:53 UTC
Update released for: yast2-country, yast2-country-data
Products:
SLE-DESKTOP 11-SP2 (i386, x86_64)
SLE-SERVER 11-SP2 (i386, ia64, ppc64, s390x, x86_64)
SLES4VMWARE 11-SP2 (i386, x86_64)
Comment 16 Bernhard Wiedemann 2016-04-15 11:56:34 UTC
This is an autogenerated message for OBS integration:
This bug (617861) was mentioned in
https://build.opensuse.org/request/show/44418 Factory / yast2-country