summaryrefslogtreecommitdiffstats
path: root/time_wizard
diff options
context:
space:
mode:
Diffstat (limited to 'time_wizard')
-rw-r--r--time_wizard/Ntp.pm21
1 files changed, 4 insertions, 17 deletions
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'
},