Author: jsuchome Date: Thu Sep 20 09:00:40 2007 New Revision: 40975 URL: http://svn.opensuse.org/viewcvs/yast?rev=40975&view=rev Log: - save correct system time from ntpdate to HW clock (#309583") - 2.15.20 Modified: trunk/country/VERSION trunk/country/package/yast2-country.changes trunk/country/timezone/src/Timezone.ycp trunk/country/timezone/src/dialogs.ycp Modified: trunk/country/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/VERSION?rev=40975&r1=40974&r2=40975&view=diff ============================================================================== --- trunk/country/VERSION (original) +++ trunk/country/VERSION Thu Sep 20 09:00:40 2007 @@ -1 +1 @@ -2.15.19 +2.15.20 Modified: trunk/country/package/yast2-country.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/package/yast2-country.changes?rev=40975&r1=40974&r2=40975&view=diff ============================================================================== --- trunk/country/package/yast2-country.changes (original) +++ trunk/country/package/yast2-country.changes Thu Sep 20 09:00:40 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Wed Sep 19 12:42:10 CEST 2007 - jsuchome@suse.cz + +- save correct system time from ntpdate to HW clock (#309583") +- 2.15.20 + +------------------------------------------------------------------- Thu Sep 13 18:26:15 CEST 2007 - kmachalkova@suse.cz - In 'change date and time' dialog, remember whether synchronization Modified: trunk/country/timezone/src/Timezone.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/src/Timezone.ycp?rev=40975&r1=40974&r2=40975&view=diff ============================================================================== --- trunk/country/timezone/src/Timezone.ycp (original) +++ trunk/country/timezone/src/Timezone.ycp Thu Sep 20 09:00:40 2007 @@ -306,6 +306,24 @@ }; /** + * Set the Hardware Clock to the current System Time. + */ +global define void SystemTime2HWClock () { + + if (!Arch::s390 ()) + { + string cmd = ""; + if (size (timezone) >0 && hwclock != "--localtime") + { + cmd = "TZ=" + timezone + " "; + } + cmd = "/sbin/hwclock --systohc " + hwclock; + y2milestone ("cmd %1", cmd); + SCR::Execute(.target.bash, cmd); + } +} + +/** * GetTimezoneForLanguage() * * Get the timezone for the given system language. Modified: trunk/country/timezone/src/dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/country/timezone/src/dialogs.ycp?rev=40975&r1=40974&r2=40975&view=diff ============================================================================== --- trunk/country/timezone/src/dialogs.ycp (original) +++ trunk/country/timezone/src/dialogs.ycp Thu Sep 20 09:00:40 2007 @@ -190,6 +190,9 @@ if (ntp_installed) { CreateUI(); + if (ntp_used) + WFM::CallFunction ("ntp-client_proposal", [ "MakeProposal", + $[ "country" : Language::GetLanguageCountry() ] ]); } if (!dt_widgets) @@ -309,10 +312,18 @@ ret = `retry; continue; } + else + { + // new system time from ntpdate must be saved to hw clock + Timezone::SystemTime2HWClock (); + } } } until( ret==`accept || ret==`cancel ); - WFM::CallFunction("ntp-client_proposal", [ "SetUseNTP", $["ntp_used" : ntp_used] ]); + + if (ntp_installed) { + WFM::CallFunction("ntp-client_proposal", [ "SetUseNTP", $["ntp_used" : ntp_used] ]); + } Wizard::CloseDialog (); return (ret == `accept); }; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org