diff options
author | jmeredith@jons-macbook.local <none@none> | 2009-12-03 22:46:37 -0700 |
---|---|---|
committer | jmeredith@jons-macbook.local <none@none> | 2009-12-03 22:46:37 -0700 |
commit | bed9ab10aaeb281d0aaa010a6e29f081bc39eecf (patch) | |
tree | 78dee32e21f85fcd916a3b2d411c51864871be50 /src | |
parent | 89dc8095b04763e54bb292dd7345dc9a08cb7438 (diff) |
Added now_str to return the local time as a string.
Diffstat (limited to 'src')
-rw-r--r-- | src/rebar_utils.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index cda6f60..b263644 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -28,7 +28,8 @@ is_arch/1, get_os/0, sh/2, - sh_failfast/2]). + sh_failfast/2, + now_str/0]). -include("rebar.hrl"). @@ -75,6 +76,10 @@ sh_failfast(Command, Env) -> ?FAIL end. +now_str() -> + {{Year, Month, Day}, {Hour, Minute, Second}} = calendar:local_time(), + lists:flatten(io_lib:format("~4b/~2..0b/~2..0b ~2..0b:~2..0b:~2..0b", + [Year, Month, Day, Hour, Minute, Second])). %% ==================================================================== %% Internal functions |