telize

High performance JSON IP and GeoIP REST API (IP Geolocation)
Log | Files | Refs | README | LICENSE

commit 9ce6fec9723bb955351e54301e75beaa83046b54
parent d157d697570c98b1ea2a03a1ef429e102cae2d57
Author: Frederic Cambus <fred@statdns.com>
Date:   Wed,  7 Mar 2018 23:28:15 +0100

Revert the 'offset' to 'timezone_offset' rename

Diffstat:
MChangeLog | 1-
Mtelize.conf | 6+++---
Mtimezone-offset.conf | 2+-
Mtz-offset.lua | 4++--
4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -10,7 +10,6 @@ Telize 2.00 (2018-03-??) - Generate timezone offsets as numeric values - Generate timezone offsets in seconds - Update timezones list -- Rename 'offset' field to 'timezone_offset' - Add support for CORS in the 'jsonip' endpoint - Rename the 'geoip' endpoint to 'location' - Add Cache-Control header in the 'jsonip' endpoint as well diff --git a/telize.conf b/telize.conf @@ -120,7 +120,7 @@ server { latitude = ngx.var.geoip2_latitude, longitude = ngx.var.geoip2_longitude, timezone = ngx.var.geoip2_timezone, - timezone_offset = ngx.var.geoip2_timezone_offset, + offset = ngx.var.geoip2_offset, asn = ngx.var.geoip2_asn, organization = ngx.var.geoip2_organization, } @@ -139,8 +139,8 @@ server { end -- Convert timezone offset to numeric value - if payload.timezone_offset ~= nil then - payload.timezone_offset = tonumber(payload.timezone_offset) + if payload.offset ~= nil then + payload.offset = tonumber(payload.offset) end -- Convert ASN to numeric value diff --git a/timezone-offset.conf b/timezone-offset.conf @@ -1,4 +1,4 @@ -map $geoip2_timezone $geoip2_timezone_offset { +map $geoip2_timezone $geoip2_offset { "Africa/Abidjan" 0; "Africa/Accra" 0; "Africa/Addis_Ababa" 10800; diff --git a/tz-offset.lua b/tz-offset.lua @@ -7,7 +7,7 @@ # https://www.telize.com # # # # Created: 2013-08-15 # -# Last Updated: 2018-03-03 # +# Last Updated: 2018-03-07 # # # # Telize is released under the BSD 2-Clause license. # # See LICENSE file for details. # @@ -505,7 +505,7 @@ local timezones = { local utcnow = luatz.time () -print("map $geoip2_timezone $geoip2_timezone_offset {") +print("map $geoip2_timezone $geoip2_offset {") for loop, timezone in ipairs(timezones) do print('\t"' .. timezone .. '" ' ..