]> git.madduck.net Git - etc/awesome.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

luatz/tzcache: Move out magic strings to file level variables
authordaurnimator <quae@daurnimator.com>
Sat, 23 Nov 2013 17:49:14 +0000 (12:49 -0500)
committerdaurnimator <quae@daurnimator.com>
Sat, 23 Nov 2013 17:49:14 +0000 (12:49 -0500)
luatz/tzcache.lua

index de62d79c09f796bc731643862a909020c80697bc..25a664dffd12e19605787959f896eae604e7d59f 100644 (file)
@@ -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