mirror of
https://github.com/openwrt/luci.git
synced 2026-01-12 02:50:25 +04:00
* luci/admin: fix inverted signedness of timezone specifiers
This commit is contained in:
@@ -23,8 +23,8 @@ s:option(Value, "hostname", translate("hostname"))
|
||||
tz = s:option(ListValue, "timezone", translate("timezone"))
|
||||
for k, offset in luci.util.vspairs(luci.http.protocol.date.TZ) do
|
||||
local zone = k:upper()
|
||||
local osgn = (offset > 0 and "+" or "")
|
||||
local ohrs = math.floor(offset / 3600)
|
||||
local osgn = (offset > 0 and "" or "+")
|
||||
local ohrs = math.floor(-offset / 3600)
|
||||
local omin = (offset % 3600) / 60
|
||||
|
||||
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)
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
||||
|
||||
Reference in New Issue
Block a user