use env for tzdata_dir

This commit is contained in:
arkdro
2013-02-13 00:46:56 +04:00
parent ca64849fed
commit 406fba57f2
2 changed files with 7 additions and 2 deletions

View File

@@ -7,7 +7,12 @@
load() ->
load(?TZDIR).
case application:get_env(tzdata_dir) of
undefined ->
load(?TZDIR);
{ok, Dir} ->
load(Dir)
end.
%% returns all records, parsed from the tzdata files in directory Dir.
load(Dir) ->