diff options
author | Erland Schönbeck <[email protected]> | 2015-03-23 12:12:38 +0100 |
---|---|---|
committer | Erland Schönbeck <[email protected]> | 2015-03-23 12:12:38 +0100 |
commit | 7a4967882b44e9048949bd8dc6cb6e953ea0c1c9 (patch) | |
tree | 54d3da0fb406b7f29538d76df0d17ff47f5a7ccc /lib/ssh/src/ssh_info.erl | |
parent | 90f97f3e17acb63bfae2e07646cfaf098ed3dbdd (diff) | |
parent | 68f600f7466abca20ab5b2f81ab3c433a2b87064 (diff) | |
download | otp-7a4967882b44e9048949bd8dc6cb6e953ea0c1c9.tar.gz otp-7a4967882b44e9048949bd8dc6cb6e953ea0c1c9.tar.bz2 otp-7a4967882b44e9048949bd8dc6cb6e953ea0c1c9.zip |
Merge branch 'erland/revert_time/OTP-12444' into maint
* erland/revert_time/OTP-12444:
Revert "Use new time API and be back-compatible in ssh"
Diffstat (limited to 'lib/ssh/src/ssh_info.erl')
-rw-r--r-- | lib/ssh/src/ssh_info.erl | 9 |
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])). |