Author: jsuchome Date: Wed Jul 2 10:58:33 2008 New Revision: 48760 URL: http://svn.opensuse.org/viewcvs/yast?rev=48760&view=rev Log: use ag_timezone Modified: branches/tmp/lslezak/workshop/country/timezone/src/Timezone.ycp Modified: branches/tmp/lslezak/workshop/country/timezone/src/Timezone.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/country/timezone/src/Timezone.ycp?rev=48760&r1=48759&r2=48760&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/country/timezone/src/Timezone.ycp (original) +++ branches/tmp/lslezak/workshop/country/timezone/src/Timezone.ycp Wed Jul 2 10:58:33 2008 @@ -242,11 +242,13 @@ boolean textmode = Language::GetTextMode (); if (inst && !textmode) SCR::Execute ( .target.bash, "/usr/bin/xset -dpms"); + /* string cmd = "/usr/sbin/zic -l " + timezone; y2milestone( "Set cmd %1", cmd ); y2milestone( "Set ret %1", SCR::Execute( .target.bash_output, cmd )); - // TODO something like - // DBUS::Execute (org.opensuse.yast/timezone.set, timezone) + */ + SCR::Write (.timezone, timezone); + // TODO: DBUS::Write (org.opensuse.yast/timezone.set, timezone) if (!Arch::s390 ()) { SCR::Write (.time.hctosys, $[ "hwclock" : hwclock ]); @@ -352,21 +354,6 @@ string hour, string minute, string second ) { if (!Arch::s390 ()) { - /* - string date = sformat( " --date=\"%1/%2/%3 %4:%5:%6\" ", month, day, - year, hour, minute, second ); - string cmd = ""; - if (size (timezone) >0 && hwclock != "--localtime") - { - cmd = "TZ=" + timezone + " "; - } - cmd = cmd + "/sbin/hwclock --set " + hwclock + date; - y2milestone( "SetTime cmd %1", cmd ); - SCR::Execute(.target.bash, cmd ); - cmd = "/sbin/hwclock --hctosys " + hwclock; - y2milestone( "SetTime cmd %1", cmd ); - SCR::Execute(.target.bash, cmd ); - */ SCR::Write (.time, $[ "datestring" : sformat (" --date=\"%1/%2/%3 %4:%5:%6\"", month, day, year, hour, minute, second), @@ -383,16 +370,6 @@ 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); - */ SCR::Write (.time.systohc, $[ "hwclock" : hwclock, "timezone" : timezone @@ -527,6 +504,8 @@ } string local_date = (string) SCR::Read (.time, argmap); y2milestone (".time agent returned %1", local_date); + if (local_date == nil) + local_date = ""; return local_date; } @@ -705,7 +684,7 @@ { return; } - +// FIXME how to map this to policies? SCR::Write(.sysconfig.clock.TIMEZONE, timezone); SCR::Write(.sysconfig.clock.DEFAULT_TIMEZONE, default_timezone); SCR::Write(.sysconfig.clock.HWCLOCK, hwclock); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org