From fc4bb72e16e19ae81d6f8b797186996c0ae46f33 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sat, 23 Nov 2013 12:49:14 -0500 Subject: [PATCH] luatz/tzcache: Move out magic strings to file level variables --- luatz/tzcache.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/luatz/tzcache.lua b/luatz/tzcache.lua index de62d79..25a664d 100644 --- a/luatz/tzcache.lua +++ b/luatz/tzcache.lua @@ -1,12 +1,14 @@ local read_tzfile = require "luatz.tzfile".read_tzfile +local base_zoneinfo_path = "/usr/share/zoneinfo/" +local local_zoneinfo_path = "/etc/localtime" local tz_cache = { } local function name_to_zoneinfo_path ( name ) if name then - return "/usr/share/zoneinfo/" .. name + return base_zoneinfo_path .. name else - return "/etc/localtime" + return local_zoneinfo_path end end -- 2.39.2