From 988a12ce6a10bea9e89505e59f2866dda79703a1 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Mon, 8 Aug 2005 03:01:24 +0000 Subject: use timezone (#15630) --- time_wizard/Ntp.pm | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'time_wizard') diff --git a/time_wizard/Ntp.pm b/time_wizard/Ntp.pm index f666944e..f2cd178f 100644 --- a/time_wizard/Ntp.pm +++ b/time_wizard/Ntp.pm @@ -27,7 +27,7 @@ use strict; use common; use services; use MDK::Wizard::Wizcommon; -require MDK::Wizard::Wizcommon; +use timezone; my $wiz = new MDK::Wizard::Wizcommon; @@ -42,20 +42,7 @@ my $o = { defaultimage => "$ENV{__WIZ_HOME__}time_wizard/images/Time.png" }; -my %ntp_servers = ( -'pool.ntp.org' => "Randomly choosen ntp server (pool.ntp.org)", -'bernina.ethz.ch' => "Swiss Fed. Inst. of Technology", -'clock.nc.fukuoka-u.ac.jp' => "Fukuoka university, Fukuoka, Japan", -'clock.psu.edu' => "Penn State University, University Park, PA", -'clock.tricity.wsu.edu' => "Washington State University Tri-Cities, Richland, Wa", -'constellation.ecn.uoknor.edu' => "University of Oklahoma, Norman, Oklahoma, USA", -'fartein.ifi.uio.no' => "University of Oslo, Norway", -'ntp.adelaide.edu.au' => "University of Adelaide, South Australia", -'ntp.cs.strath.ac.uk' => "Dept. Computer Science, Strathclyde University, Glasgow, Scotland", -'ntp.shim.org' => "Singapore", -'ntp.tmc.edu' => "Baylor College of Medicine, Houston, Tx", -'ntp1.cmc.ec.gc.ca' => "Canadian Meteorological Centre, Dorval, Quebec, Canada" -); +my $ntp_servers = timezone::ntp_servers(); my %actions = ( try_again => N("Try again"), @@ -91,8 +78,8 @@ $o->{pages} = { $o->{var}{varserver2} ||= 'pool.ntp.org'; }, data => [ - { label => N("Primary time server:"), val => \$o->{var}{varserver1}, list => [ keys %ntp_servers ], format => sub { $ntp_servers{$_[0]} } }, - { label => N("Secondary time server:"), val => \$o->{var}{varserver2}, list => [ keys %ntp_servers ], format => sub { $ntp_servers{$_[0]} } }, + { label => N("Primary time server:"), val => \$o->{var}{varserver1}, list => [ keys %$ntp_servers ] }, #format => sub { $ntp_servers{$_[0]} } }, + { label => N("Secondary time server:"), val => \$o->{var}{varserver2}, list => [ keys %$ntp_servers ] }, # format => sub { $ntp_servers{$_[0]} } }, ], next => 'choose_region' }, -- cgit v1.2.1