Fixed a small bug in timezone generation
authorSteven Barth <steven@midlink.org>
Thu, 31 Jul 2008 09:04:30 +0000 (09:04 +0000)
committerSteven Barth <steven@midlink.org>
Thu, 31 Jul 2008 09:04:30 +0000 (09:04 +0000)
modules/admin-full/luasrc/model/cbi/admin_system/system.lua
modules/admin-mini/luasrc/model/cbi/mini/system.lua

index 4e6342d..6cc5c49 100644 (file)
@@ -23,7 +23,7 @@ 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()  
 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 osgn = (offset >= 0 and "" or "+")
        local ohrs = math.floor(-offset / 3600)
        local omin = (offset % 3600) / 60
        
        local ohrs = math.floor(-offset / 3600)
        local omin = (offset % 3600) / 60
        
index 06064f9..298c794 100644 (file)
@@ -23,7 +23,7 @@ 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()  
 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 osgn = (offset >= 0 and "" or "+")
        local ohrs = math.floor(-offset / 3600)
        local omin = (offset % 3600) / 60
        
        local ohrs = math.floor(-offset / 3600)
        local omin = (offset % 3600) / 60