diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-01-05 17:06:47 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2012-01-05 17:06:47 +0100 |
commit | 6347e1dfc61e6532262dec2db101567ee35c0b94 (patch) | |
tree | ad68c1c3ae6ba6db56eb1a82f66f0dc613adef04 /lib/stdlib | |
parent | 96477e4f9df5dfe6c16a897b6540d4b58a9a167d (diff) | |
download | otp-6347e1dfc61e6532262dec2db101567ee35c0b94.tar.gz otp-6347e1dfc61e6532262dec2db101567ee35c0b94.tar.bz2 otp-6347e1dfc61e6532262dec2db101567ee35c0b94.zip |
stdlib: Refactor to tag all times in error logger
Diffstat (limited to 'lib/stdlib')
-rw-r--r-- | lib/stdlib/src/error_logger_file_h.erl | 4 | ||||
-rw-r--r-- | lib/stdlib/src/error_logger_tty_h.erl | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/stdlib/src/error_logger_file_h.erl b/lib/stdlib/src/error_logger_file_h.erl index db81d517a4..08f1873803 100644 --- a/lib/stdlib/src/error_logger_file_h.erl +++ b/lib/stdlib/src/error_logger_file_h.erl @@ -180,7 +180,7 @@ maybe_utc(Time) -> maybe_utc(Time, UTC). maybe_utc(Time, true) -> {utc, Time}; -maybe_utc(Time, _) -> calendar:universal_time_to_local_time(Time). +maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}. format_report(Rep) when is_list(Rep) -> case string_p(Rep) of @@ -233,7 +233,7 @@ write_time(Time) -> write_time(Time, "ERROR REPORT"). write_time({utc,{{Y,Mo,D},{H,Mi,S}}}, Type) -> io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n", [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]); -write_time({{Y,Mo,D},{H,Mi,S}}, Type) -> +write_time({local, {{Y,Mo,D},{H,Mi,S}}}, Type) -> io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s ===~n", [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]). diff --git a/lib/stdlib/src/error_logger_tty_h.erl b/lib/stdlib/src/error_logger_tty_h.erl index c7b565bd06..48e069a407 100644 --- a/lib/stdlib/src/error_logger_tty_h.erl +++ b/lib/stdlib/src/error_logger_tty_h.erl @@ -173,7 +173,7 @@ maybe_utc(Time) -> maybe_utc(Time, UTC). maybe_utc(Time, true) -> {utc, Time}; -maybe_utc(Time, _) -> calendar:universal_time_to_local_time(Time). +maybe_utc(Time, _) -> {local, calendar:universal_time_to_local_time(Time)}. format(IOMod, String) -> format(IOMod, String, []). format(io_lib, String, Args) -> io_lib:format(String, Args); @@ -229,7 +229,7 @@ write_time(Time) -> write_time(Time, "ERROR REPORT"). write_time({utc,{{Y,Mo,D},{H,Mi,S}}},Type) -> io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s UTC ===~n", [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]); -write_time({{Y,Mo,D},{H,Mi,S}},Type) -> +write_time({local, {{Y,Mo,D},{H,Mi,S}}},Type) -> io_lib:format("~n=~s==== ~p-~s-~p::~s:~s:~s ===~n", [Type,D,month(Mo),Y,t(H),t(Mi),t(S)]). |