Fixed a small bug in timezone generation

This commit is contained in:
Steven Barth 2008-07-31 09:04:30 +00:00
parent 66fa0eb0e8
commit aa462baa33
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ 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

View file

@ -23,7 +23,7 @@ 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