Merge pull request #10 from arkdro/master

load tzdata from `tzdata_dir` env if set, or fall back to old behavior.
This commit is contained in:
aj heller
2013-02-12 12:56:05 -08:00
2 changed files with 7 additions and 2 deletions

View File

@@ -7,5 +7,5 @@
stdlib stdlib
]}, ]},
{mod, {ezic_app, ezic_db_ets}}, {mod, {ezic_app, ezic_db_ets}},
{env, [{db_dir, "db"}]} {env, [{db_dir, "db"}, {tzdata_dir, "priv/tzdata"}]}
]}. ]}.

View File

@@ -7,7 +7,12 @@
load() -> 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. %% returns all records, parsed from the tzdata files in directory Dir.
load(Dir) -> load(Dir) ->