Skip to content
Snippets Groups Projects
Verified Commit 658fc2ee authored by Vojtech Myslivec's avatar Vojtech Myslivec
Browse files

date: Add timezone and country config

parent 966684b2
Branches
Tags v12.1
No related merge requests found
......@@ -4,11 +4,24 @@ help="
$(gettext "Print current date and verify that NTP can synchronize time.")
"
get_system_config() {
local option="$1"
uci -q get "system.@system[0].$option" \
|| error "Can not get $option configuration"
}
run () {
section "Current time"
date
section "UCI configuration"
subsection "zonename"
get_system_config "zonename"
subsection "timezone"
get_system_config "timezone"
subsection "country"
get_system_config "_country"
subsection "NTP configuration"
uci -q show 'system.ntp' || error 'Can not get ntp configuration'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment