* luci/admin: fix inverted signedness of timezone specifiers
This commit is contained in:
parent
4e587d53a8
commit
a93196b432
2 changed files with 6 additions and 6 deletions
|
@ -23,8 +23,8 @@ s:option(Value, "hostname", translate("hostname"))
|
||||||
tz = s:option(ListValue, "timezone", translate("timezone"))
|
tz = s:option(ListValue, "timezone", translate("timezone"))
|
||||||
for k, offset in luci.util.vspairs(luci.http.protocol.date.TZ) do
|
for k, offset in luci.util.vspairs(luci.http.protocol.date.TZ) do
|
||||||
local zone = k:upper()
|
local zone = k:upper()
|
||||||
local osgn = (offset > 0 and "+" or "")
|
local osgn = (offset > 0 and "" or "+")
|
||||||
local ohrs = math.floor(offset / 3600)
|
local ohrs = math.floor(-offset / 3600)
|
||||||
local omin = (offset % 3600) / 60
|
local omin = (offset % 3600) / 60
|
||||||
|
|
||||||
local ptz = zone .. osgn .. (ohrs ~= 0 and ohrs or "") .. (omin ~= 0 and ":" .. omin or "")
|
local ptz = zone .. osgn .. (ohrs ~= 0 and ohrs or "") .. (omin ~= 0 and ":" .. omin or "")
|
||||||
|
@ -36,4 +36,4 @@ end
|
||||||
s:option(Value, "log_size", nil, "kiB").optional = true
|
s:option(Value, "log_size", nil, "kiB").optional = true
|
||||||
s:option(Value, "log_ip").optional = true
|
s:option(Value, "log_ip").optional = true
|
||||||
s:option(Value, "conloglevel").optional = true
|
s:option(Value, "conloglevel").optional = true
|
||||||
return m
|
return m
|
||||||
|
|
|
@ -23,8 +23,8 @@ s:option(Value, "hostname", translate("hostname"))
|
||||||
tz = s:option(ListValue, "timezone", translate("timezone"))
|
tz = s:option(ListValue, "timezone", translate("timezone"))
|
||||||
for k, offset in luci.util.vspairs(luci.http.protocol.date.TZ) do
|
for k, offset in luci.util.vspairs(luci.http.protocol.date.TZ) do
|
||||||
local zone = k:upper()
|
local zone = k:upper()
|
||||||
local osgn = (offset > 0 and "+" or "")
|
local osgn = (offset > 0 and "" or "+")
|
||||||
local ohrs = math.floor(offset / 3600)
|
local ohrs = math.floor(-offset / 3600)
|
||||||
local omin = (offset % 3600) / 60
|
local omin = (offset % 3600) / 60
|
||||||
|
|
||||||
local ptz = zone .. osgn .. (ohrs ~= 0 and ohrs or "") .. (omin ~= 0 and ":" .. omin or "")
|
local ptz = zone .. osgn .. (ohrs ~= 0 and ohrs or "") .. (omin ~= 0 and ":" .. omin or "")
|
||||||
|
@ -33,4 +33,4 @@ for k, offset in luci.util.vspairs(luci.http.protocol.date.TZ) do
|
||||||
tz:value(ptz, dtz)
|
tz:value(ptz, dtz)
|
||||||
end
|
end
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
Loading…
Reference in a new issue