aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_info.erl
diff options
context:
space:
mode:
authorErland Schönbeck <[email protected]>2015-03-16 15:17:26 +0100
committerErland Schönbeck <[email protected]>2015-03-16 15:28:47 +0100
commit68f600f7466abca20ab5b2f81ab3c433a2b87064 (patch)
tree35ada88768be8cba83e7761fd21a73d360a853eb /lib/ssh/src/ssh_info.erl
parent5fde23474656c1934250e8b8a9c7399dc00d5bdf (diff)
downloadotp-68f600f7466abca20ab5b2f81ab3c433a2b87064.tar.gz
otp-68f600f7466abca20ab5b2f81ab3c433a2b87064.tar.bz2
otp-68f600f7466abca20ab5b2f81ab3c433a2b87064.zip
Revert "Use new time API and be back-compatible in ssh"
This reverts commit af972aaf14a5f53510e692f48f672f7e6805ee6d. Conflicts: lib/ssh/test/ssh_basic_SUITE.erl
Diffstat (limited to 'lib/ssh/src/ssh_info.erl')
-rw-r--r--lib/ssh/src/ssh_info.erl9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/ssh/src/ssh_info.erl b/lib/ssh/src/ssh_info.erl
index e5a8666af0..9a91875894 100644
--- a/lib/ssh/src/ssh_info.erl
+++ b/lib/ssh/src/ssh_info.erl
@@ -179,14 +179,7 @@ line(Len, Char) ->
datetime() ->
- %% Adapt to new OTP 18 erlang time API and be back-compatible
- TimeStamp = try
- erlang:timestamp()
- catch
- error:undef ->
- erlang:now()
- end,
- {{YYYY,MM,DD}, {H,M,S}} = calendar:now_to_universal_time(TimeStamp),
+ {{YYYY,MM,DD}, {H,M,S}} = calendar:now_to_universal_time(now()),
lists:flatten(io_lib:format('~4w-~2..0w-~2..0w ~2..0w:~2..0w:~2..0w UTC',[YYYY,MM,DD, H,M,S])).