Added an API for getting and setting the system and hardware times, for calling by other modules.
---- Changes since 1.210 ----
When the hardware or system time is not editable due to module access control restrictions, the times are now displayed (but cannot be changed).
+---- Changes since 1.340 ----
+Added check for empty timeservers field.
} elsif( $in{ 'action' } eq $text{ 'index_sync' }) {
# Sync with a time server
$access{'ntp'} || &error($text{'acl_nontp'});
+ $in{'timeserver'} =~ /\S/ || &error($text{'error_etimeserver'});
$err = &sync_time($in{'timeserver'}, $in{'hardware'});
&error($err) if ($err);
error_sync=Can't sync with system time : $1
error_ediff=Time server different with local time is too large : $1 days
error_entp=NTP time synchronization failed : $1
+error_etimeserver=No time servers to sync with entered
log_set_date=Set system time to $1
log_set_hwclock=Set hardware clock to $1