summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-07-20 17:07:54 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-07-20 17:07:54 +0000
commita93196b432c45f9b56e0d148b447b8ecd0db1b3b (patch)
treeba49bf6c07ae543238cb65e9e2f660ce8b5e50c4 /modules
parent4e587d53a882be462f32e9e4bf03d87ed216871d (diff)
* luci/admin: fix inverted signedness of timezone specifiers
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/model/cbi/admin_system/system.lua6
-rw-r--r--modules/admin-mini/luasrc/model/cbi/mini/system.lua6
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
index 260bac176..4e6342d7e 100644
--- a/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
+++ b/modules/admin-full/luasrc/model/cbi/admin_system/system.lua
@@ -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 "")
@@ -36,4 +36,4 @@ end
s:option(Value, "log_size", nil, "kiB").optional = true
s:option(Value, "log_ip").optional = true
s:option(Value, "conloglevel").optional = true
-return m \ No newline at end of file
+return m
diff --git a/modules/admin-mini/luasrc/model/cbi/mini/system.lua b/modules/admin-mini/luasrc/model/cbi/mini/system.lua
index 06f8707f7..06064f95e 100644
--- a/modules/admin-mini/luasrc/model/cbi/mini/system.lua
+++ b/modules/admin-mini/luasrc/model/cbi/mini/system.lua
@@ -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 \ No newline at end of file
+return m